Hi
I hope someone can help me. I have been creating an advert in Edge that has an embedded Youtube video in it. The problem I am having is that when the ad is clicked on or the close button pressed the video and sound is still playing in the background.
Is it possible to pause or stop the video with a bit of script on the buttons? I found one solution that clears the video container from the stage but unfortunately it means you cant go back to the video and play it without reloading the page.
I have read several old threads on here but none of them seem to be able to help me much.
The video code I used is:
var youtubevid = $("<iframe/>");
sym.$("vcontainer").append(youtubevid);
youtubevid.attr('type','text/html');
youtubevid.attr('width','546');
youtubevid.attr('height','308');
youtubevid.attr('src','http://www.youtube.com/embed/n1UpcgsS5do?rel=0'); // url/Video_Id
youtubevid.attr('frameborder','0'); // 1 | 0
youtubevid.attr('allowfullscreen','0'); // 1 | 0
The code I have used so far to stop it which wasn't quite right as it completely clears the video symbol off the ad and won't allow you to replay it if you return to the page with the ad on is:
sym.$("vcontainer").empty();
Thanks
Stuart