Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

onComplete event with multiple players in html5

6 replies [Last post]
Reply

Hello,

First the short story about what I'm working on. I am making wrapper code around jwplayer because i need the controlbar to be hidden when showing commercials and because i need a countdown when showing these commercials. So basically i feed my own code with a playlist and do .remove() and .setup() each time i progress in my playlist. I use the licensed version of jwplayer.

Now the problem. I need to be able to have multiple instances of the player running on a webpage and i do need them to work in both flash and html5. Because i only feed jwplayer with one video at a time i need to listen to the 'onComplete' event to know when to progress to the next video. When running in flash-mode there are no issues with this but in html5-mode i observe something really strange. I should emphasize the problem only happens when more than 1 player is actually playing. What happens when 2 or more jwplayers are playing at the same time is whenever the first player triggers a 'complete' event it seems to trigger the 'complete' event for the other players as well. The other player will halt while the 'first player' will continue and from now on the 'first player' will fire 2 'complete' events every time it completes a playthrough.

Here is a link to a testpage with 2 players preferring html5-mode and 2 players preferring flashmode to also show how it works:
http://lts.dev.dam.digizuite.dk/dmm3bwsv3/embedplayer/test_multiple_autostarts.htm

Here is a version with only the html5-players:
http://lts.dev.dam.digizuite.dk/dmm3bwsv3/embedplayer/test_multiple_autostarts_html5only.htm

You can test with Firefox or Safari (both will respect the order of preference set in the 'modes' parameter). I'm currently not sure about other browsers. I recommend using Firefox with firebug as you can see me printing events in the console. Notice the guids that i use to make players unique. With the 'ready' event things happen as they should but with the 'complete' event things get messed up. Sometimes it actually works right after the first playthrough. To make sure it happens pause 1 player 2 seconds and then play again.

I am of course open to suggestions about doing things differently.

Reply

@Leon -

This doesn't sound like the expected behavior. I've created a ticket to investigate the issue.

http://developer.longtailvideo.com/trac/ticket/1565

Reply

Thank you :)

Reply

@Leon -

A patch is in place to address this bug. Please check it out here, and let us know if you still notice anything unusual happening:

http://developer.longtailvideo.com/trac/browser/trunk/fl5

Reply

@Pablo S
Hi and sorry for my slow response. I have been working on other projects and I'm afraid it will probably be like another 2 weeks before I can get back on this but I will check it out as soon as my project manager allows me.

Reply

Hi,
I just want to confirm this issue has been resolved with the patch and version 5.9.

Thanks again.

Reply

@Leon -

Great, good to hear. Thanks for the feedback.

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options