Menu
Coddy logo textTech

Loop

Lesson 5 of 7 in Coddy's YouTube Video Player - HTML Project course.

To play the video in a loop, we can use loop=1 as a query parameter, but it's not enough, you need to add playlist=id with id being the video id, for example:

https://www.youtube.com/embed/dQw4w9WgXcQ?loop=1&playlist=dQw4w9WgXcQ
challenge icon

Challenge

Easy

Make your video loop on top of the other properties.

Try it yourself

<!DOCTYPE html>
<html>
    <body>
        <iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ?mute=1&autoplay=1">
        </iframe>
    </body>
</html>

All lessons in YouTube Video Player - HTML Project