Commit ca1da6c8 by Waheed Ahmed

Fixed transcript not follow with video on seek.

TNL-235
parent 7e1b4466
......@@ -382,6 +382,26 @@ function (VideoPlayer) {
}, 'video didn\'t start playing', WAIT_TIMEOUT);
});
it('call runTimer in seekTo on player', function () {
runs(function () {
spyOn(state.videoPlayer, 'stopTimer');
spyOn(state.videoPlayer, 'runTimer');
state.videoPlayer.seekTo(10);
});
waitsFor(function () {
return state.videoPlayer.currentTime >= 10;
}, 'currentTime is less than 10 seconds', WAIT_TIMEOUT);
runs(function () {
expect(state.videoPlayer.stopTimer)
.toHaveBeenCalled();
expect(state.videoPlayer.runTimer)
.toHaveBeenCalled();
});
});
// as per TNL-439 this test is deemed flaky and needs to be fixed.
// disabled 09/18/2014
xit('slider event causes log update', function () {
......
......@@ -489,6 +489,11 @@ function (HTML5Video, Resizer) {
this.videoPlayer.updatePlayTime(time, true);
this.el.trigger('seek', arguments);
// the timer is stopped above; restart it.
if (this.videoPlayer.isPlaying()) {
this.videoPlayer.runTimer();
}
}
function runTimer() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment