
Jwplayer Seek function not working
I am writing a code to handle breakage of internet connection.
So what I am doing: I am showing a message to user that his internet is disconnected and giving a button to Resume video when net connected.
here is code what i did and seek is not working and video playing from starting. How I can achieve it?
var resumetime=0;
function resume()
{
resumetime=Math.round(_player.getPosition());
_player.play();
}
Player onplay event is this:
_player.onPlay(function () {
try {
this.seek(resumetime);
} catch (e) {
}
});
I did in this way also :
function Resume()
{
try {
_player.play(true);
_player.seek(Math.round(_player.getPosition()));
} catch (e) {
}
}