Commit 79f11de6 by polesye

Merge pull request #1342 from edx/anton/fix-video-multi-speed-bug

Video player: Fix multi speed bug
parents 9df72360 df091e50
...@@ -138,25 +138,7 @@ function (VideoPlayer) { ...@@ -138,25 +138,7 @@ function (VideoPlayer) {
// support HTML5. When we have this setting in cookies, we can select // support HTML5. When we have this setting in cookies, we can select
// the proper mode from the start (not having to change mode later on). // the proper mode from the start (not having to change mode later on).
function _setPlayerMode(state) { function _setPlayerMode(state) {
(function (currentPlayerMode) { state.currentPlayerMode = 'html5';
if (
(currentPlayerMode === 'html5') ||
(currentPlayerMode === 'flash')
) {
state.currentPlayerMode = currentPlayerMode;
} else {
$.cookie('current_player_mode', 'html5', {
expires: 3650,
path: '/'
});
state.currentPlayerMode = 'html5';
}
console.log(
'[Video info]: YouTube player mode is "' +
state.currentPlayerMode + '".'
);
}($.cookie('current_player_mode')));
} }
// function _parseYouTubeIDs(state) // function _parseYouTubeIDs(state)
......
...@@ -146,11 +146,6 @@ function (HTML5Video, Resizer) { ...@@ -146,11 +146,6 @@ function (HTML5Video, Resizer) {
// Remove from the page current iFrame with HTML5 video. // Remove from the page current iFrame with HTML5 video.
state.videoPlayer.player.destroy(); state.videoPlayer.player.destroy();
// Remember for future page loads that we should use Flash mode.
$.cookie('current_player_mode', 'flash', {
'expires': 3650,
'path': '/'
});
state.currentPlayerMode = 'flash'; state.currentPlayerMode = 'flash';
console.log('[Video info]: Changing YouTube player mode to "flash".'); console.log('[Video info]: Changing YouTube player mode to "flash".');
......
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