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

Apply object-fit: cover to the <video/> element #83

Open
saaymeen opened this issue Jan 31, 2023 · 5 comments
Open

Apply object-fit: cover to the <video/> element #83

saaymeen opened this issue Jan 31, 2023 · 5 comments

Comments

@saaymeen
Copy link

Currently, there does not seem to be a solution for filling the whole player viewport with the video provided (known as cover). The <video/> element cannot be styled since it's loaded in the <iframe/>.

@didier
Copy link

didier commented Apr 12, 2023

I'd say this is high priority. It's a blocker for us, for sure.

@paulius005
Copy link

+1 I need to be able to add style elements to the video element as well

@idrislin
Copy link

idrislin commented Aug 3, 2023

I have the same problem and I desperately need to fix it, any ideas please :(

@third774
Copy link
Contributor

third774 commented Aug 16, 2023

Assuming the use case here is for a short (maybe 30-60 seconds?) looping background video, this can be achieved using the mp4 downloads feature. Enable the mp4 download on the video you'd like to use, then set the mp4 URL as the src on a video element in your page.

https://codepen.io/third774/pen/yLGBpqj

Using the mp4 directly for this use case is better anyways since it's not worth downloading the JS to stream such a short video with ABR anyways.

If this doesn't solve your issue, we're interested to hear more about what you're trying to accomplish with this!

@JasonLeviGoodison
Copy link

Need this feature asap too. Is there another library that does this natively?

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

6 participants