Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Embed YouTube - Full Screen

Featured Replies

I don't suppose anyone has the code that enables a YouTube video to be embedded as a full-screen background to they? A quick google search does not render a simple answer.

 

Please advise. Thank you in advance.

  • Author

I was able to find a css hack to let the YouTube video play in full-screen mode automatically using the below css, but it is to scale. What actually plays is 100% height and width is to scale. Is there anyway to have it be 100% width and height overflow is hidden (assuming controls are not needed - autoplay / loop) or simply have the video 100% width / height & not to scale?

 

<style>

#YouTube1

{

position: fixed !important;

left: 0 !important

top: 0 !important

width: 100% !important

height: 100% important

}

 

YouTube iframe

{

width: 100% !important

height: 100% !important

}

</style>

 

It doesn't exactly answer your question, but this makes a YouTube video responsive, filling the available width and preserving the aspect ratio. Note the iframe tag is modified too:



.video-responsive{
overflow:hidden;
padding-bottom:56.25%;
position:relative;
height:0;
}
.video-responsive iframe{
left:0;
top:0;
height:100%;
width:100%;
position:absolute;
}
<div class="video-responsive"><iframe style="display: block; margin-left: auto; margin-right: auto;" src="//www.youtube.com/embed/bLZWTkNyZFo?autoplay=1" width="853" height="480" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div>

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.