
JWPlayer shows the beginning frame of the video on seek
Hi,
I've the following code that execute a small replay of the last 5 seconds of my video
jwvideo.onReady(function() {
replay_done = false;
this.setMute(true);
tag = document.querySelector('video');
tag.defaultPlaybackRate = 1.0;
tag.playbackRate = 1.0;
});
jwvideo.onComplete(function() {
if (!replay_done) {
$("#replay").show();
var replay_time = 5;
this.seek(this.getPosition() - replay_time);
tag.playbackRate = 0.3;
replay_done = true;
}
else {
$("#replay").hide();
endVideoAndDisplayResults();
}
});
But when onComplete is fired for the first time, JWPlayer shows for a moment the first frame of my video, and then seeks. Apart from that, playbackRate is fine and replay is fine.
I'm using JWPlayer in HTML5 mode, on .mp4 videos, and this frame is showed on every browser (IE, FF, Chrome and Safari).
How can I solve this?