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.
in mix.exs
def deps do
[
{:icecast, "~> 1.0.2"},
]
endiex> Icecast.read_meta("http://ice1.somafm.com/lush-128-mp3")
{:ok, %Meta{}}Icecast use the hackney 4.x adapter as default.
You can use the alternative Req adapter.
# config/config.exs
# Make sure to install `mint` package as well, recommended
config :icecast, adapter: Icecast.Adapter.ReqA Finch instance can be configured for it:
# config/config.exs
# Make sure to install `mint` package as well, recommended
config :icecast, finch: instance_name iex> Shoutcast.read_meta("http://ice1.somafm.com/lush-128-mp3", [], Icecast.Adapter.Req)