VideoJS Event Ends in Firefox Launch

I use JS video, and in firefox the event "ended" is fired at the end and at the beginning of video playback.

Take a look at this script in FF: http://jsfiddle.net/planadecu/a3Chu/

It works correctly in all other browsers.

The piece of code that is called when the video starts is as follows:

var videoPlayer = _V_("video", {}, function(){ this.addEvent("ended", function(){ this.posterImage.el.style.display = 'block'; }); });​ 

I need to trigger an event only at the end of the video, not at the beginning. Do you know a way to solve this problem (for me this is a mistake)?

You can play it on the violin.

Thanks for your help.

+6
source share
1 answer

I think this is a problem with your video ...

Check this out: http://jsfiddle.net/a3Chu/2/

All I did was delete this source file:

 <source type="video/webm" src="http://www.reservango.com/static/video/reservango_video_vfinal_CAT.webm"> 

I noticed that the script is working correctly - the video starts at the end (!)

I tried with alternative .webm files and they behaved normally, so I got stuck thinking it was something with your file in particular.

I used FF 15.0.1 for testing

EDIT

I also tested this on FF 16.0.2 - it still seems that this video file in particular. You can, of course, change the source code to try other formats first. I know that my FF will run .ogv if .webm is the last source element in a modified script (see above). However, this will not be completely reliable. I also found this (old version of FF, but same problem): fooobar.com/questions/772855 / ... , which offers the same approach.

It is very strange to me that some .webm files work ... Can you try to transcode the video? Also, I would check all your mime type on this server, in case they are wrong, and only FF starts to get confused (it won’t be the first time ...). This also explains why the .webm hosted elsewhere is excellent.

+4
source

All Articles