Embed youtube videos that play in fullscreen automatically

后端 未结 1 1723
我在风中等你
我在风中等你 2021-01-07 22:39

So what I\'m trying to do is have fullscreen video across my website. But I would like to auto play a youtube video and automatically in fullscreen (The size of the browser

相关标签:
1条回答
  • 2021-01-07 23:13

    This was pretty well answered over here: How to make a YouTube embedded video a full page width one?

    If you add '?rel=0&autoplay=1' to the end of the url in the embed code (like this)

    <iframe id="video" src="//www.youtube.com/embed/5iiPC-VGFLU?rel=0&autoplay=1" frameborder="0" allowfullscreen></iframe>
    

    of the video it should play on load. Here's a demo over at jsfiddle.

    0 讨论(0)
提交回复
热议问题