• Resolved Ramzii

    (@ramzii)


    Hi there, I appreciate your plugin and will review for sure.

    I have a question how to embed an autoplay video.

    Currently I used such a code:

    <iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/XXX?rel=0&autoplay=1&#8243; frameborder=”0″ allowfullscreen></iframe>

    But it starts immediately when the page is loaded.
    I want it to start autoplay only when the button (trigger) is clicked.

    The clicking of the button must trigged the autoplay. Can this be achieved with js? Please help me on the right road. Thank you.

    • This topic was modified 6 years, 9 months ago by Ramzii.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Damian

    (@timersys)

    Here you have the javascript to the the opposite. Your developer should be able to adapt it to make it play as it’s the exact same code.

    https://gist.github.com/timersys/99db1a8d2c8db74cb954

    If you like the plugin / support please leave a short review. It’s a tremendous help for us!

    Thanks

    Thread Starter Ramzii

    (@ramzii)

    Thanks so much Damian! This did the trick.
    It is not starting automatically when the page is loaded.

    One more thing: the autoplay function is not starting at all when the trigger button is clicked.

    Is there a code I can add to script.js to enable youtube autoplay after the popup is triggered?

    As stated before: I want it to start autoplay only when the button (trigger) is clicked.

    Please have a look at this site for the issue: https://pastebin.com/hBuZ5vSS
    You can find the popup underneath the black button called “Hoe het werkt”.

    Thank you Damian.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Autoplay youtube iframe starts without clicking popup button’ is closed to new replies.