Put Youtube video as site background

0

I want to put a background video on a standby screen. Can you do this by pulling a video from youtube without showing the default buttons and starting it automatically? What Jquery do I have to put the video that is on my host.

$('body').bg({
position:"fixed",
zIndex:-1,
mp4:'meuvideo.mp4',
ogv:'meuvideo.ogv',
webm:'meuvideo.webm',
poster:'meuvideo.jpg',
opacity:0.5
});

Here I pull the video straight from my server, and from youtube?

    
asked by anonymous 26.06.2016 / 22:07

1 answer

1

Felipe, good afternoon.

You can put a youtube video as a background using a modified youtube link. This link contains additional information both in pathInfo and parameters

Using an iFrame, as the user @Miguel commented, it is possible to leave the video as a background:

<iframe frameborder="0" height="100%" width="100%" src="https://youtube.com/embed/ID?autoplay=1&controls=0&showinfo=0&autohide=1"></iframe>

NotethatyouneedtochangetheIDofthelinkpostedabovewiththecorrespondingIDofthevideo.Beingthat:

  • theautoplay=1parametermeansthatthevideowillstartautomatically.
  • Thecontrols=0parametermeanstherewillbenocontroloptions,suchasplay,volume,config,fullscreen,captions,etc.
  • theshowinfo=0parametermeanstheplayerwillnotshowthevideoname
  • theautohide=1parametermeansthatthevideoprogressbarwillbeinvisible.

Youcanreadinformation here

    
27.06.2016 / 21:22