Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter 30000monkeys

    (@30000monkeys)

    * happens in all ie versions and SRWare 31.0.1700.0.
    Works fine in Firefox 26 though.

    Thread Starter 30000monkeys

    (@30000monkeys)

    Sry for spamming ??

    I found a solution from those guys

    https://webdevstudios.com/2013/02/13/how-to-stop-a-youtube-video-from-playing-when-closing-a-lightbox-modal/

    So the code I needed looks like this:

    jQuery(document).bind('dialogclose', function() {
    var vid = jQuery('.svg-video-object iframe[src*="youtube"]');
    if ( vid.length > 0 ){
    var src = vid.attr('src');
    vid.attr('src', '');
    vid.attr('src', src);
    }
    });

    Maybe you wanna patch it?

    Anyways, resolved for me.

    Wrote a Review now, 5 stars!

    Thread Starter 30000monkeys

    (@30000monkeys)

    Ok this code had some problems, I found another (and simpler) solution:

    .dialog({
            'dialogClass'   : 'wp-dialog',
            'modal'         : true,
            'autoOpen'      : false,
            'closeOnEscape' : true,
            'title'         : link.attr('title'),
            'width'         : 580,
            'height'        : 440,
            'buttons'       : { },
            // FIX
            close: function() {
                var inrHTML = $(this).html();
                $(this).empty().html(inrHTML);
            }
            // #FIX
          });
    Plugin Author mch0lic

    (@mch0lic)

    Thanks, will include soon!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Player doesn't stop when closed’ is closed to new replies.