I integrate Video.js into the project and have several problems.
I have this in my HTML as:
<video id="vidView" class="video-js vjs-default-skin" width="320" height="320" poster="/siteImages/Dummy.png" preload="auto"> <source type="video/mp4" src="" \> </video>
And in my javascript I load the source and can play it.
var vidPlayer = _V_("vidView"); vidPlayer.src({ type: "video/mp4", src: vidlink }); vidPlayer.play();
Only for this software there were problems: every second source and game downloader will work. It seemed to me that I tried to play before video.js was ready, so I tried to use listeners to start the game at the right time.
I found that some events never fire at all. I can not get anything from the event "loadalldata" or "loaded data". The "loadstart" event fires at least, so I put my .play () command there.
vidPlayer.addEvent("loadstart", function(){ console.log("LOAD START Fired" ); var myPlayer = this; myPlayer.play(); } );
But this is not yet reliable. I see messages on my console "Trying to resume!" repeatedly. He plays a few videos, but sometimes gets connected.
Am I missing something to get the "loadeddata" event?
Also, related Q - I notice that the docs say that the syntax for removing an event listener is:
myPlayer.removeEvent ("eventName", myFunc);
It is right? It seems that the "myFunc" part is redundant, and I am wondering if this is a copy / paste error in the documentation or if this is the correct syntax.
thanks in advance.