我想从 youtube 创建一个播放列表背景视频,我有这个
HTML
<div id="video"> <iframe src="//www.youtube.com/embed/Fhy6CHZ9dvY?list=PL82A0C437FEE5F6DA?autoplay=1&controls=0&loop=1&rel=0&showinfo=0&autohide=1&wmode=transparent&hd=1" www.youtube.com="" embed="" width="100%" height="100%" frameborder="0"></iframe>
</div>
CSS
height: 100%;
width: 100%;
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: -1000;
此代码适用于一个视频并在视频结束时停止,我想知道在完成第一个视频后自动播放视频的任何方式,如播放列表。
我尝试从 youtube 嵌入播放列表,但不起作用。
最佳答案
在 list=PL82A0C437FEE5F6DA
之后添加 &
而不是 ?
。
所以最终的代码应该是这样的-
<div id="video">
<iframe src="//www.youtube.com/embed/Fhy6CHZ9dvY?list=PL82A0C437FEE5F6DA&autoplay=1&controls=0&loop=1&rel=0&showinfo=0&autohide=1&wmode=transparent&hd=1" www.youtube.com="" embed="" width="100%" height="100%" frameborder="0"></iframe>
</div>
关于html - 背景播放列表 Youtube 视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25085762/