So if you scrub the first video to the end ("Why Smarter Storage"), it jumps over the next in line ("Efficient by Design") and starts playing "Self Optimizing" Are you not seeing this?
Hi Ethan, I like the new look of jw6, the default skin is cool! Also it seems to work a lot better on mobile which is great.
I helped write the javascript for the page Ryan mentioned above here: http://centerlinebeta.net/jw-test/
Overall the videos do play really well.
The main issue we are having as Ryan said is that when you scrub to the end of a video in our player and let it finish, rather than playing the next video it skips to the video after next. The core problem seems to be that the oncomplete even gets fired prematurely.
Can you please take a look at the javascript in link below and confirm we have setup the jw6 player correctly? http://centerlinebeta.net/jw-test/lib/js/main.js
Definitely isn't working on multiple OS X WebKit browsers both in our office and at our homes. Any ideas on how we can fix/avoid this issue.
I can consistently reproduce it in those browsers, so the question stands are we doing something incorrectly in our JS? Is there something we need to do differently.
I have been able to reproduce this on Chrome (Mac OS X) and it has proved quite an interesting challenge to resolve!
Basically, the function that is bound to "onComplete" is responsible for "loading" and "playing" the next video in the playlist array - which is does.
However, on Mac OS it appears the "load" and "play" is getting wrapped up in the context of the existing (not-quite-finished) "onComplete" event.
The "load" happens, and then the "play" happens, but the problem is the "play" is actually picking up state from the ever-so-nearly-finished "onComplete" - which means it immediately fires the "onComplete" call again... We go around the loop again. However the next time round the "onComplete" has actually finished (the underlying video "ended" event is fired) and so the play starts from the proper position - the only problem is it's now the wrong video.
The solution:
You need to take the "load" / "play" combo out of the normal event flow so that the "onComplete" can actually complete without interference. This can easily be done by wrapping them in a setTimeout() as follows (_this is in the switchVideo() function_):
bc.. setTimeout(function(){ jwplayer().load({ sources: [ {'file': 'media/'+vid+'.mp4', 'title': 'Power Systems History and Future'}, {'file': 'media/'+vid+'.webm', 'title': 'Power Systems History and Future'} ]}).play();