bower-videogular-youtube
bower-videogular-youtube copied to clipboard
Youtube video: change autoplay using radioButton
Hi, I see that I can enable Youtube's video autoplay in youtube.js from videogular-youtube pluggin:
playerVars = {
'controls': 0,
'showinfo': 0,
'rel': 0,
'autoplay': 0, //Switch autoplay to 1 to autoplay videos
'start': 0
};
My problem is that I have two radioButtons for enable or disable autoplay. How can I make that, when I select enable autoplay, change the property to autoplay the video?
P.D. Sorry for my English.
When radioButton
change value you need re-set autoplay
in playerVars
How can I do that? I don't have any idea.
@lazaro92 Just make your idea in codepen, I'll help you for it work
The thing is that I have a database of youtube videos. This database is:
Video : { id: "", url: "", autoplay: "" }
so, when I click radiobutton, it changes the database value of autoplay (true/false). I have to set autoplay when I load the page and obtain the video info from database.