Search code examples
jwplayervideo.jsicecastshoutcastinternet-radio

Web audio player with Icecast metadata support?


Is there any web player, like jwplayer or video.js, that supports playing audio streams from Icecast, and would also be able to raise events when new metadata has been received on the stream?

JWPlayer has this http://support.jwplayer.com/customer/portal/articles/1413089-javascript-api-reference#metadata. But it doesn't seem to work for Icecast metadata.

My intention is to get notified, on the clients, at the exact moment a piece of metadata has been introduced into the stream.

Thanks


Solution

  • I'd recommend to have a look at the muses player.

    Other options are:

    • Firefox has a vendor specific javascript API for metadata (tested with Ogg container and Vorbis as well as Opus codecs). Other browsers may have similar.
    • Querying the specific Icecast server through JSON API (2.4.1 and above) or custom XSLT. The downside being, that this will not provide you with exact timing. Though also in the other two options there may be a delay between the metadata registering and the audio being played reaching that point due to decoder buffers and such.
    • Going out of band with a second data stream providing the metadata, though keeping audio and out of band metadata in sync might be tricky. Possibly XMLHTTPRequest with continuous data. I've seen this done with decent results.