Support » Plugin: Displet Pop » Problem with YouTube embed in Pop-Up

  • Resolved mikesakoon


    I greatly appreciate the Displet Pop plugin, but it looks like I’ve encountered a problem that might eliminate it as a solution for my site.

    When I use Displet Pop to display and embedded YouTube video, the close button doesn’t stop the video from playing. It’s visibility seems to be hidden, but the video does not stop playing – the audio continues after the pop-up is gone.

    Is there a way to stop the video when clicking the close button?

    Thanks for your insights and expertise!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Displet


    Hi mikesakoon –

    Sorry for my delayed response here. We’re always pleasantly surprised with new ways people use our plugin. There’s not a good way for us to control the volume in an embedded video, so unfortunately, we can’t fix this problem. Very sorry about that, and if anyone has any ideas, we’d love to hear them.


    Hi mikesakoon,

    We have run into the same issue with displaying a video using the plugin and having the audio still playing in the background when closing the pop-up, and fortunately were able to come up with a solution! Not sure if you are still in need of help on this, but hopefully it will help someone having a similar issue. The solution involves editing the plugin file (displet-pop.php), so use caution when doing this!
    1) in your displet pop widget, give your YouTube iframe tag a class name. So your code in your widget should look something like this:
    <iframe class="yt" src="" width="600" height="448"></iframe>
    2) in displet-pop.php, find the function called hideDispletPop(). after the last line of code before the closing } in that function, add a new jQuery line that looks something like the following:

    function hideDispletPop() {
    	jQuery(".yt").attr('src',''); /* new line here */

    What that last line does is clears the ‘src’ attribute of your iframe. This basically says when you close the pop-up, set the iframe to nothing so there will be no video to play. When the pop-up opens again, it will open the default iframe in your widget until you close it again.

    Hope this helps!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with YouTube embed in Pop-Up’ is closed to new replies.