Jump to content

create a loop with the playVideo function


Recommended Posts

Hi

I'm creating a script, and in it I use a playVideo function, to play a Youtube video.

But when setting the parameter loop=1  , the video does not restart.

 

I will leave the function part.

autoplay=1&showinfo=0&rel=0&controls=0&disablekb=1&mute=1&loop=1

Link to post

I managed to find a solution! Instead of using playVideo, use loadBrowserURL! Create a timer with the time of the video, use destroyElement and then reloadBrowserPage.

Link to post

Hello,

The problem is from YouTube's side. Loop doesn't work if you don't add playlist ID in the arguments. You can simply put the video ID as playlist ID.

Something like this:

https://www.youtube.com/embed/{VIDEO_ID}?autoplay=1&showinfo=0&rel=0&controls=0&disablekb=1&mute=1&loop=1&playlist={VIDEO_ID}

 

Edited by SpecT
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...