From a0aa652df41abd5e420fdab70e7cbd1bfe52fff9 Mon Sep 17 00:00:00 2001 From: Valera Rozuvan Date: Mon, 5 Aug 2013 15:00:18 +0300 Subject: [PATCH] Fixed typo of function call. Added comment why it is necessary. --- .../xmodule/xmodule/js/src/videoalpha/03_video_player.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/js/src/videoalpha/03_video_player.js b/common/lib/xmodule/xmodule/js/src/videoalpha/03_video_player.js index 6f2e232844..be2287be6e 100644 --- a/common/lib/xmodule/xmodule/js/src/videoalpha/03_video_player.js +++ b/common/lib/xmodule/xmodule/js/src/videoalpha/03_video_player.js @@ -318,7 +318,14 @@ function (HTML5Video) { availablePlaybackRates = this.videoPlayer.player.getAvailablePlaybackRates(); if ((this.currentPlayerMode === 'html5') && (this.videoType === 'youtube')) { if (availablePlaybackRates.length === 1) { - restartUsingFlash(this); + // This condition is needed in cases when Firefox version is less than 20. In those versions + // HTML5 playback could only happen at 1 speed (no speed changing). Therefore, in this case, + // we need to switch back to Flash. + // + // This might also happen in other browsers, therefore when we have 1 speed available, we fall + // back to Flash. + + _restartUsingFlash(this); return; } else if (availablePlaybackRates.length > 1) {