Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for suggestions for pure JS HTML5 MSE based player for Icecast streams #15

Open
Brahmasmi opened this issue Sep 8, 2017 · 4 comments

Comments

@Brahmasmi
Copy link

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 - shaka-project/shaka-player#725.

Thanks.

@jucrouzet
Copy link

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.

@Brahmasmi
Copy link
Author

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.

@jucrouzet
Copy link

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.

@guest271314
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants