-
Stop the Music !
Hello there,
I am creating a site for a church organ restoration group and have encountered a problem which is causing me some confusion.
There are several pages showing videos of previous concerts, I simply create popup layers and paste in the mp4 files. Up to this current site it seemed to work fine but now I am finding that when I close the popup before the video has completed the music simply keeps playing ! I have tried assorted MP4 files all with the same unwanted result.
Does anyone have any experience and advice on this problem ?
Thanks in advance.
-
Re: Stop the Music !
Welcome to TalkGraphics.
I don't have an answer to this. But I am moving this thread to the web design chat forum.
-
1 Attachment(s)
Re: Stop the Music !
There was a similar request some time ago. I still have an example file and just checked if it works. The only thing to it is some javascript at the website body code section.
Give it a try if you like, but keep in mind that it is not fully tested.
The only thing it does (or tries to do) is to pause a video (that uses the built in player) when the pop-up layer it is placed on is closed. It is implemented by misusing an internal Xara callback function, so it might be very well possible that there are undesired side effects.
Feel free to report them if you discover one (or some). ;)
-
1 Attachment(s)
Re: Stop the Music !
Sorry, I overlooked the support folder. If you add a mp4 video Xara automatically creates one and places the video file and some other stuff there...
I attach it as a zip file for your reference.
-
Re: Stop the Music !
Hi Siran, thanks for your speedy reply
I follow the idea of stopping the video and then closing the popup but I am too much of an amateur to know where to position the unzipped files
Could you please send me some (very) simple instructions ?
Best wishes
-
Re: Stop the Music !
Not sure it this is what you are asking for.
The support folder (included in the zip file) has always to be placed in the same folder as the xar file and has to have the name of your design file with the dot replaced by underscore and an added _files
If you rename the design file to .web you would have to rename the support folder to ..._web_files
For example if you rename the design file to abc.web the name of the folder would have to be abc_web_files
If you want to stop the video when the pop-up is closed (instead of pausing it) just replace the code at the website body section with
Code:
<script>
[].forEach.call(document.querySelectorAll("video.xar_meplayer"),function(v){v.xr_reset=v.stop;});
</script>
just changing v.pause to v.stop
-
Re: Stop the Music !
Many thanks Siran,
I will save and try to get my head round it !
The good news is that the problem is solved. The page involved was a duplicated page of one containing quite a few graphic elements and assorted links. This linking was no longer visible in the duplicated version but must have been still present in the code and causing the problem. I created a new page adding the graphic elements seperately without any included code and everything works just fine !
Thanks for your help and patience.