DEV Community

wimdenherder
wimdenherder

Posted on

Loop a YouTube Video with 2 lines of code

Copy paste this in the developer console:

v = document.querySelector('video')
v.onended = () => v.currentTime = 0
Enter fullscreen mode Exit fullscreen mode

A very simple trick to have your video be looped forever! :-)

Top comments (0)