Youtube video as background on section showing black lines depending on screen size

Hi,

do you know how I can get the video to just adjust to the screen size and not show the black lines (sometimes they are at the side and sometimes top and bottom) like a self hosted video does?

I’ll send a url in a private message.

Thanks

Hi @glassballoon,

Thanks for writing in.

As a section background, I recommend self-hosted videos like mp4. Not all browser supports youtube/video format especially the background uses MediaElementJS player instead of Embed type, and Youtube is best implemented in embed type. If you add Youtube as a background, it will work but the player will then convert it to iframe since it’s not the same as mp4/video format (or similar). And because of that, the player has no control over the video within an iframe, and please also note that within the iframe, Youtube has its own player too.

The black background is added by youtube player itself. You can either use selft-hosted video OR upload a Youtube video with matching the aspect ratio (https://www.mediacollege.com/video/aspect-ratio/) of your current section.

I also added more explanation in a secure note.

Thanks!

Thank you for the help, I’ll look at self hosting it as the size of the section will change dependent on screen resolution. Thank again.

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.