Support » Plugin: WP Video Lightbox » Youtube audio keeps playing after closing popup

  • Resolved radboud


    I have setup a youtube movie to play in an iframe using this plugin. To make sure it plays when the thumbnail is clicked, I have set ‘AutoPlay’ to true in video-lightbox.js.
    In Windows 7, on Internet Explorer 10, when I close the popup, the movie disappears, but the sound keeps on playing. I have verified that this problem doesn’t occur on IE 9, Chrome 27, Firefox 21 on Windows, and Safari, Firefox, Opera and Chrome on the Mac.

    It seems the issue has to do with hiding the div containing the movie. In all browsers but IE 10, this will stop the movie from playing.

    As a workaround I have made some changes to my local version of video-lightbox.js. By altering the IFrame src to something else (I used ‘’), just before closing the window, the problem went away.

    Code for this:
    Line 5: Added function for the ‘ESC’ key:

    $(document).keyup(function(e) {
    if (e.keyCode == 27) { // Esc

    Line 33:
    markup: '<script language="javascript"> \
    function clearMovie() { \
    document.getElementById("pp_full_res").childNodes[0].src=""; \
    } \
    </script> \
    }<div class="pp_pic_holder"> \

    Line 65:
    <a class="pp_close" onClick="clearMovie();" href="#">Close</a> \

    Of course there will be nicer ways of doing this using JQUERY, but at least it works for me.


Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Youtube audio keeps playing after closing popup’ is closed to new replies.