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

HTML Video: Allow a child Picture Element to Control the Video Poster Image #10378

Open
scottjehl opened this issue May 29, 2024 · 1 comment

Comments

@scottjehl
Copy link

What is the issue with the HTML Standard?

The video element currently offers a single poster attribute, which allows us to load one poster image source. This is limiting when attempting to deliver an appropriate poster image size depending on browsing conditions. It would be better if multiple sources could be offered to the browser to display based on varying conditions, as several other issues have mentioned.

Some of those conditions are:

  • image resolution switching
  • screen resolution/density differences
  • art direction with videos with different aspect ratios for different viewport sizes

To expand on that last point: now that the video element allows for "responsive" source elements that use media attributes, developers can offer video sources based on media conditions like orientation, pixel density, and more.

Some proposals have suggested attributes to expand our ability to reference poster image sources, but attributes alone could be limited in trying to address even the cases listed above.

Allowing a picture element inside the video element could be a way to offer all of the various use cases that a poster image may need to cover. (This idea was first pointed out here I believe: #6636 (comment) )

Thanks!

@scottaohara
Copy link
Collaborator

reminder that allowing for this would then make providing alt text for the posters doable, and thus could close #7954

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

No branches or pull requests

2 participants