diff --git a/common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js b/common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js index b22cdd375e..2f9126cd8c 100644 --- a/common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js +++ b/common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js @@ -51,14 +51,14 @@ }); }); - it('callback was called', function () { + it('callback was not called', function () { waitsFor(function () { return state.videoPlayer.player.getPlayerState() !== STATUS.PAUSED; }, 'Player state should be changed', WAIT_TIMEOUT); runs(function () { expect(state.videoPlayer.player.callStateChangeCallback) - .toHaveBeenCalled(); + .not.toHaveBeenCalled(); }); }); }); @@ -85,14 +85,14 @@ }); }); - it('callback was called', function () { + it('callback was not called', function () { waitsFor(function () { return state.videoPlayer.player.getPlayerState() !== STATUS.PLAYING; }, 'Player state should be changed', WAIT_TIMEOUT); runs(function () { expect(state.videoPlayer.player.callStateChangeCallback) - .toHaveBeenCalled(); + .not.toHaveBeenCalled(); }); }); }); diff --git a/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js b/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js index dc3fd7974b..dca85c9d85 100644 --- a/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js +++ b/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js @@ -290,13 +290,11 @@ function () { var PlayerState = HTML5Video.PlayerState; if (_this.playerState === PlayerState.PLAYING) { - _this.pauseVideo(); _this.playerState = PlayerState.PAUSED; - _this.callStateChangeCallback(); + _this.pauseVideo(); } else { - _this.playVideo(); _this.playerState = PlayerState.PLAYING; - _this.callStateChangeCallback(); + _this.playVideo(); } });