Reputation: 111
I want to create a playlist background videos from youtube, i have this
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;
This code works for one video and stop when the video finish, i want to know any way to play a video after finish the first one automatically, like a playlist.
I tried embeding the playlist from youtube but isn't working.
Upvotes: 2
Views: 2714
Reputation: 8521
Add &
instead of ?
right after the list=PL82A0C437FEE5F6DA
.
So the final code should looks like this-
<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>
Upvotes: 1