• Resolved luizvaranda

    (@luizvaranda)


    I have a popup which is set to be displayed (via a CSS class) once a “Watch Video” button is clicked. The popup contains an embedded YouTube video (iframe) and it is set to auto play. The issue is that I can hear the audio from the video before I click the button to display the popup. I believe the video is playing “in the background” once the page loads. I need the video only to auto play once the pop up is revealed. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi.

    What is your URL?
    How do you can put autoplay in your youtube embed?

    Regards

    Thread Starter luizvaranda

    (@luizvaranda)

    Unfortunately I can’t give you the URL since the site is currently under development and being hosted at my personal server.

    You can add the autoplay feature by adding “?autoplay=1” to the embedding code. The code I am using as the content of the popup is:

    <iframe width="1120" height="630" src="https://www.youtube.com/embed/W-iAfk2Su9o?autoplay=1&quot; frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

    And sometimes (it does not happen every time) the video starts playing before the popup is triggered by a “Watch Video” button.

    • This reply was modified 3 years, 10 months ago by luizvaranda.

    Hi.

    I was testing your embed code but it always opens the popup with the video in stop.

    Here a video:
    https://www.loom.com/share/e3aca39351f542a9bb6c4a4249044b7c

    Regards

    Thread Starter luizvaranda

    (@luizvaranda)

    Thank you for the reply however, you need to replace the &quot; code (after the autoplay=1 in the iframe code) with double quotes, otherwise the autoplay will not work, like in the video. Also, this issue doesn’t happen every time the page loads but I already received complaints from 2 of my clients using the plugin. Thank you!

    Thread Starter luizvaranda

    (@luizvaranda)

    Hi again, do you have any updates on this? Thanks!

    Plugin Author Damian

    (@timersys)

    I cannot reproduce the issue either. The audio is not there, and only start when the popup it’s visible and when it’s close the audio stops.

    We would need to see the issue on your site because it seems it’s related to your enviroment

    Thread Starter luizvaranda

    (@luizvaranda)

    Thank you Damian for the reply. I would not like to publicly post the link to the site since it is still being hosted in my development server. Do you have an email address I can send it to? Thanks!

    Plugin Author Damian

    (@timersys)

    Thread Starter luizvaranda

    (@luizvaranda)

    Hello Damian… I have submitted the URL of my server via the Contact form on your site. Do you have any updates about this? Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘YouTube video is auto playing before the pop-up is set to appear’ is closed to new replies.