• Resolved seanpaulrasmussen

    (@seanpaulrasmussen)


    Hi,

    Here’s my scenario: The content of my Popup is an autoplay youtube video. It works…

    The problem: Even once the user has visited and the cookie prevents the popup, the video is still playing behind the scenes (you can hear it but not see it)…

    Is there something I can hook into with jquery to just strip out the content entirely once the cookie is activated…? Or a way to prevent the youtube video from autoplaying behind the scenes?

    I know it’s a weird scenario, but it would be a great solution for people wanting to have popup videos…

    Thanks in advance!,
    Sean

    https://wordpress.org/plugins/popup-maker/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @seanpaulrasmussen – You need to disable autoplay and then use this guide to start it on open.

    http://docs.wppopupmaker.com/article/86-start-video-when-the-popup-opens

    Hope that helps.

    Thread Starter seanpaulrasmussen

    (@seanpaulrasmussen)

    Daniel — that is exactly what I was looking for! thanks!

    And, thanks for monitoring and responding so quickly to the forum.

    Thread Starter seanpaulrasmussen

    (@seanpaulrasmussen)

    For anyone else using this solution, I had to change the youtube syntax slightly: Instead of ‘?autoplay=1’, I had to use ‘;autoplay=1″ — It probably depends on the particular video URL syntax is…

    $iframe.prop(‘src’, ”).prop(‘src’, src + ‘;autoplay=1’);

    Plugin Author Daniel Iser

    (@danieliser)

    @seanpaulrasmussen – I will add a note to the docs about that. Thanks for posting it back here for others.

    Please take a moment to rate and review the plugin and or support.

    Thanks!!! @seanpaulrasmussen ;autoplay=1 perfect!

    Like @seanpaulrasmussen, I had to change the syntax, but instead of just a semi-colon, I needed >>> & amp ; <<< (spaces added to display all chars in this post)

    So the full line is
    $iframe.prop('src', '').prop('src', src + '& amp ;autoplay=1');
    Again, spaces added show all chars in my post. Actual code has no spaces starting with the &

    Great plugin! And thanks for the tips here. I tried a few different approaches autoplay when a popup opens, but this was the only solution.

    Plugin Author Daniel Iser

    (@danieliser)

    @tzeldin88 – Awesome, yea currently without heavy work Youtubes videos don’t support play/pause other than to load the video again unfortunately.

    Btw, If you have a moment, I would very much appreciate if you could quickly click that it Works for you and rate the plugin, just to help us spread the word.

    I have tried all the different combination, mentioned above.
    But the autoplay is not starting.

    I am using the Plugin: Custom CSS & JS
    and pasted the folowing code in the ‘JS Code’

    jQuery(‘#pum-123’)
    .on(‘pumBeforeOpen’, function () {
    var $iframe = jQuery(‘iframe’, jQuery(this)),
    src = $iframe.prop(‘src’);
    $iframe.prop(‘src’, ”).prop(‘src’, src + ‘?autoplay=1’);
    });

    But nothing is happening.
    I also tried the different tips by other users, but it does not autoplay.

    The popup is on the page: http://www.trouwfeest-animatie.be/vuurspuwer/
    on the first picture when scrolled down.

    Hope you can see what I am doing wrong…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Auto-play video plays even when popup not shown’ is closed to new replies.