Hi Guys
I have a popup on a site which contains a video, The issue I am having is that when the video is playing and the popup is closed it continues to play in the background.
The code is below, is there anything I can do to stop the video playing on close or do I need to be looking at a java script solution for the popup
var video = document.getElementById("video_block");
if (video) {
video.pause();
}
below the following line:
close: function(e,u) {
in the js/core.js
Remove var/cache folder.
Or there are a lot of these pop-ups with different videos?
Thank you for that, No at the moment there is only one video, I have embedded the link directly into a new product template as it is only for 4 specific products.
The file that you mentioned js/core.js is not in the js/ folder. I take it that it is in /js/tygh
If I modify this directly will it be overwritten on upgrade.
Oh, sorry. Yes, this file is in js/Tygh/core.js, indeed. You are right.
And it might be overwritten while upgrade. But it has no hooks, no ways to override this file directly. You can copy this file to add-on and overrider the common/scripts.tpl to include your modified file.
Or just note where you made this change and restore it after upgrade. In any case you should modify the behaviour of dialog:close method