I know there are similar questions to this, but I haven\'t quite been able to get it to work.
This code shows a YouTube video which is within an iframe. When a button (
You need to reset the link of the video, i had a similar problem this is how i solved it, i used jQuery in the process.
//First get the iframe URL
var url = $('#YourIFrameID').attr('src');
//Then assign the src to null, this then stops the video been playing
$('#YourIFrameID').attr('src', '');
// Finally you reasign the URL back to your iframe, so when you hide and load it again you still have the link
$('#YourIFrameID').attr('src', url);
Check this answer