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

mediatype supported? #33

Open
byangcs opened this issue Jan 26, 2016 · 1 comment
Open

mediatype supported? #33

byangcs opened this issue Jan 26, 2016 · 1 comment

Comments

@byangcs
Copy link

byangcs commented Jan 26, 2016

Hey man quick question. How could I check whether the media player supports a certain format? I see that you have the function getBestMedia which matches the closest width, height, and bitrate, but what if the player doesn't actually support a certain format?

Thanks!

screen shot 2016-01-25 at 8 06 44 pm

@jonhoo
Copy link
Owner

jonhoo commented Jan 26, 2016

Unless things have changed, you need to have a <video> element in order to check for video playback capabilities, and even then, all you get is a return value of "probably" at best. To do a more rigorous test, you would need to construct the video element, start playing, and listen for the canplay event. I decided not to do that inside the library code, as it would require a lot of browser support, and might even break the user's browsing experience unexpectedly (e.g., sound suddenly starts playing).

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

2 participants