2

My website use jwplayer embedded both self-host video and youtube video,

pause,play event works fine on both case, however seek even can only catch by self-host video .

The two cases are using the same code.

Can somebody tell me what can i do to fix it?

here is my code:

playerInstance = jwplayer("player");
playerInstance.setup({
  modes: [
    file: '<{$youtuve_url}>',
    width: $('#video').width(),
    height: $('#video').height(),
    autostart: false
});

playerInstance.on('seek',function(event){
    console.log("seek");
} );
張軒銘
  • 130
  • 1
  • 13
  • Do you have a link? Chances are you using an old player version that uses an old YouTube API integration though. – emaxsaun Sep 08 '15 at 14:30
  • @EthanJWPlayer i had tried link : http://www.youtube.com/watch?v=ylLzyHk54Z0 which is a example schema and it still not work – 張軒銘 Sep 09 '15 at 07:17
  • I mean a link to where you player embed code is running on your site. – emaxsaun Sep 09 '15 at 15:06
  • well i decided to use youtube api directly despite this issue i find out that the subtitle can't be used directly by jwplayer and change rate function will have some other code to compose – 張軒銘 Oct 07 '15 at 08:39
  • It would be nice if you could have shown an actual example. – emaxsaun Oct 07 '15 at 20:00

1 Answers1

1

Delete the modes:[

playerInstance = jwplayer("player");
playerInstance.setup({
   file: '<{$youtuve_url}>',
    width: $('#video').width(),
    height: $('#video').height(),
    autostart: false
});

playerInstance.on('seek',function(event){
    console.log("seek");
} );
zer00ne
  • 41,936
  • 6
  • 41
  • 68
  • hey @zer00ne i tried to delete the modes attribute and it still not work, and all the rest event are work correctly . Is there any other possible thing i can fix it? thanks :) – 張軒銘 Sep 07 '15 at 03:57
  • @張軒銘 Try testing events here: [Basic API](http://qa.jwplayer.com/support-demos/basic-api.html) – zer00ne Sep 07 '15 at 04:19
  • Do you think Is there a possible this is a bug of jwplayer? if it is caused by my player configuration , the self-host video seek event should be wrong too. – 張軒銘 Sep 07 '15 at 07:21
  • Did you try using the source of that test page and modify it for your situation? You could compare the video setup to your own and see if there's a difference. – zer00ne Sep 07 '15 at 07:41