Icecast
Read metadata from Shoutcast & Icecast streams.
This is a fork of https://github.com/ryanwinchester/shoutcast_ex, updated to work with hackney 4.x & other clients.
Installation
in mix.exs
def deps do
[
{:icecast, "~> 1.0.1"},
]
end
Usage
iex> Icecast.read_meta("http://ice1.somafm.com/lush-128-mp3")
{:ok, %Meta{}}
HTTP client adapters
Icecast use the hackney 4.x adapter as default.
You can use the alternative Req adapter.
Using configuration
# config/config.exs
# Make sure to install `mint` package as well, recommended
config :icecast, adapter: Icecast.Adapter.Req
A Finch instance can be configured for it:
# config/config.exs
# Make sure to install `mint` package as well, recommended
config :icecast, finch: instance_name
At call time
iex> Shoutcast.read_meta("http://ice1.somafm.com/lush-128-mp3", [], Icecast.Adapter.Req)