diff --git a/common/lib/xmodule/xmodule/js/src/videoalpha/display/html5_video.js b/common/lib/xmodule/xmodule/js/src/videoalpha/display/html5_video.js index 1623b1b5eb..c4f375d138 100644 --- a/common/lib/xmodule/xmodule/js/src/videoalpha/display/html5_video.js +++ b/common/lib/xmodule/xmodule/js/src/videoalpha/display/html5_video.js @@ -183,17 +183,8 @@ this.HTML5Video = (function () { } }, false); this.video.addEventListener('timeupdate', function (data) { - console.log('[timeupdate]'); - console.log(_this.video.currentTime); - if (_this.video.end > _this.video.currentTime) { - console.log('_this.video.end >= _this.video.currentTime -> pausing video'); - _this.playerState = HTML5Video.PlayerState.PAUSED; - - if ($.isFunction(_this.config.events.onStateChange) === true) { - _this.config.events.onStateChange({ - 'data': _this.playerState - }); - } + if (_this.end < _this.video.currentTime) { + _this.video.pause(); } }, false); @@ -206,6 +197,9 @@ this.HTML5Video = (function () { Player.prototype.seekTo = function (value) { if ((typeof value === 'number') && (value <= this.video.duration) && (value >= 0)) { + this.start = 0; + this.end = this.video.duration; + this.video.currentTime = value; } };