Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Resume is not Working


Hi All,

I am having a question regarding Seek the player. Currently I am using JW Player 7.6.1 version. With this resume video function is not working.

What I does previously is I passed the current playing position to the server and I am getting the server position when video is resuming. But now (after the upgrade to the 7.6.1) resume function is not working.

Here is my code,

jwplayer('media').setup ({
'file': video_url,
'provider': 'video',
'width': '640',
'height': '420',
'image':video_image,
'autostart': false,
'primary': 'flash'
}).seek(seek_time);

seek_time is a variable where I am passing the seek time to the player.

Let me know where I am wrong..?

5 Community Answers

a...

Best Answer 

Hi,

I came up with an another way that works for me.

jwplayer('media').setup ({
'file': video_url,
'provider': 'video',
'width': '640',
'height': '420',
'image':video_image,
'autostart': true,
'primary': 'flash'
});

jwplayer('media').on('firstFrame', function() {
jwplayer('media').seek(seek_time);
});

I don't know why code @George is not working when bind 'firstFrame' to the setup. But when I use it as a different function it is working fine. Another thing I need to mention here is need to make autostart to true. Then the video seek working really fine for me with the version 7.6.1

View in conversation

George

JW Player Support Agent  
0 rated :

Hi,

I’d suggest using something like

jwplayer(‘media’).setup ({
‘file’: video_url,
‘provider’: ‘video’,
‘width’: ‘640’,
‘height’: ‘420’,
‘image’:video_image,
‘autostart’: false,
‘primary’: ‘flash’
}).on(‘firstFrame’,function(){
jwplayer().seek(seek_time);
});

a...

User  
0 rated :

Thanks for your reply. But it is not working for me. It is not starting auto playing even. When using the seek it should start play once it seek. Now it is not seeking even and not start playing.

George

JW Player Support Agent  
0 rated :

Hi,

If you’d like it to autoplay on desktop browsers use this code:

jwplayer(‘media’).setup ({
‘file’: video_url,
‘provider’: ‘video’,
‘width’: ‘640’,
‘height’: ‘420’,
‘image’:video_image,
‘autostart’: true,
‘primary’: ‘flash’
}).on(‘firstFrame’,function(){
jwplayer().seek(seek_time);
});

a...

User  
0 rated :

Hi George,

Yes I know 'autostart': true is staring autoplay for videos. But my problem is seek is not working here. Videos start play from the beginning. Not seek to the position. Always start playing from the beginning.

a...

Best Answer  User  
0 rated :

Hi,

I came up with an another way that works for me.

jwplayer('media').setup ({
'file': video_url,
'provider': 'video',
'width': '640',
'height': '420',
'image':video_image,
'autostart': true,
'primary': 'flash'
});

jwplayer('media').on('firstFrame', function() {
jwplayer('media').seek(seek_time);
});

I don't know why code @George is not working when bind 'firstFrame' to the setup. But when I use it as a different function it is working fine. Another thing I need to mention here is need to make autostart to true. Then the video seek working really fine for me with the version 7.6.1

This question has received the maximum number of answers.