Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youtube video: change autoplay using radioButton #62

Open
lazaro92 opened this issue Aug 2, 2016 · 4 comments
Open

Youtube video: change autoplay using radioButton #62

lazaro92 opened this issue Aug 2, 2016 · 4 comments

Comments

@lazaro92
Copy link

lazaro92 commented Aug 2, 2016

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.

@NamPNQ
Copy link
Owner

NamPNQ commented Aug 2, 2016

When radioButton change value you need re-set autoplay in playerVars

@lazaro92
Copy link
Author

lazaro92 commented Aug 2, 2016

How can I do that? I don't have any idea.

@NamPNQ
Copy link
Owner

NamPNQ commented Aug 2, 2016

@lazaro92 Just make your idea in codepen, I'll help you for it work

@lazaro92
Copy link
Author

lazaro92 commented Aug 3, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants