Website youtube embedded video keeps playing?

I faced the same problem before What I did is remove the src of the iframe when I close the popup and put it back on when I open it in jQuery. This way, i'm sure the video won't keep playing when the popup is closed Edit Added an Exemple: Add an optional parameter in your function containing the video url a href="javascript:void(null)" onclick="popup('popUpDiv', 'youtube.com/embed/NWHfY_lvKIQ')" class="more_details">more detailsAttr('src', '').

I faced the same problem before. What I did is remove the src of the iframe when I close the popup and put it back on when I open it in jQuery. This way, i'm sure the video won't keep playing when the popup is closed.

Edit Added an Exemple: Add an optional parameter in your function containing the video url more details Set the src of your iframe in your function with the video url function popup(pPopup, pYt){ //pYt optional $('iframe'). Attr('src', pYt); } Add this line in your code when you want to remove the source $('iframe'). Attr('src', '').

I'm a bit of a noob with jquery and what not – user577732 Sep 30 at 20:51.

Changing the display of the frame isn't going to stop the video. You would have to remove the iframe element when the popup closes.

You can also ditch the iframe code and use a youtube embed. Then in your javascript event you can player.pauseVideo(); where player is your embedded object. Use the Youtube Player API: code.google.com/apis/youtube/js_api_refe....

Still haven't got an answer to this – user577732 Oct 2 at 18:01.

I'm using the iframe youtube gave me to embed a video on my website. And everything is working as I want it to however if I switch my browser to either internet explorer or chrome when I select close to close the popup the video keeps playing? I've done some googling and found others with my same issue however I only could find code that didn't work as it was supposed to.

Basically I'd like to stop the video when the popup is closed how could this be done.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions