Icecast-Server
Icecast-Server copied to clipboard
Request for suggestions for pure JS HTML5 MSE based player for Icecast streams
Is there a pure Javascript based HTML5 player that can play Icecast streams using Media Source Extensions?
I ask this because the pull request #6 mentions @jucrouzet and @marcelgwerder talking about a JS/HTML5/MSE based player using XHR/Fetch.
I have previously tried to figure out if Google's Shaka player could play Icecast streams, but it seems they cannot, at least based on their current architecture - https://github.com/google/shaka-player/issues/725.
Thanks.
You can play an icecast stream in an <audio>
tag as long as the stream is based on a codec that your browser can read. Just put its url in the src
attribute (<audio>
or <source>
).
AFAIK, the #6 PR is useful for a a pure JS player that can use icecast metadata (title, etc.) in the stream, the PR is being reviewed by Icecast team.
Thanks @jucrouzet for your comment.
I understand that putting the URL source in the audio tag should play the stream, but in certain cases the container + codec is not supported natively in the browser (canPlayType). It is supported via MSE (isTypeSupported).
For example, MS Edge supports WebM, VP9 and Opus via MSE but not natively. Please see here - https://blogs.windows.com/msedgedev/2016/04/18/webm-vp9-and-opus-support-in-microsoft-edge/.
Hence the need to use MSE if one wishes to use open source royalty free container + codecs.
Well, yep, that's one use case for the pure JS / MSE player I'm doing. But yep, it needs #6 to be merge as it needs chunks to be downloaded via XHR/Fetch, so it needs CORS.
Is there a pure Javascript based HTML5 player that can play Icecast streams using Media Source Extensions?
Media Source Extensions are not necessary to play an Icecast stream at HTMLMediaElement
. I streamed 8 hours of audio using FetchEvent.respondWith(fetch('/path/to/icecast/stream'))
https://bugs.chromium.org/p/chromium/issues/detail?id=1161429#c44.