-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Support the media attribute on source elements #624
Comments
it's a shame. What it means 'media' good tool |
It may have been in the spec but for a long time none of the browsers were actually supporting it with HTML5 video. Does anyone know the current state of support for this in browsers? I would love for this to be supported, so labeling as confirmed+unclaimed, incase someone wants to pick it up and work on it. |
In case someone is having this issue and comes here in the course of their googling, here's how I solved it using the videojs player ready callback function:
|
@gkatsev is there a support for media in the 7.6.5 version ? By default it loads the first source, i would like to make it load its appropriate sources based on media breakpoint definitions. |
This is not something we currently support. |
It seems that whilst Video.js will select the appropriate source file based on the supported filetypes and playback technology, it doesn't pay attention to the media attribute.
The above should load the SD video (second source) when the browser window is between 500px and 1200px wide, but Video.js will always use the first (mobile) source because it is the first supported filetype.
I've seen some talk in the past of this being dropped from the spec, but as far as I can tell it's still in the latest editors draft.
The text was updated successfully, but these errors were encountered: