Commit cf47f522 by Valera Rozuvan

Fix Firefox YouTube default Flash mode

BLD-895
parent c85905d6
......@@ -183,6 +183,25 @@ function (VideoPlayer) {
});
});
describe('onReady YouTube', function () {
beforeEach(function () {
state = jasmine.initializePlayerYouTube();
state.videoEl = $('video, iframe');
});
it('multiple speeds and flash mode, change back to html5 mode', function () {
var playbackRates = state.videoPlayer.player.getAvailablePlaybackRates();
state.currentPlayerMode = 'flash';
state.videoPlayer.onReady();
expect(playbackRates.length).toBe(4);
expect(state.currentPlayerMode).toBe('html5');
});
});
describe('onStateChange', function () {
describe('when the video is unstarted', function () {
beforeEach(function () {
......
......@@ -559,7 +559,7 @@ function (HTML5Video, Resizer) {
);
if (
this.currentPlayerMode === 'html5' &&
(this.currentPlayerMode === 'html5' || availablePlaybackRates.length > 1) &&
this.videoType === 'youtube'
) {
if (availablePlaybackRates.length === 1 && !this.isTouch) {
......@@ -573,6 +573,8 @@ function (HTML5Video, Resizer) {
_restartUsingFlash(this);
} else if (availablePlaybackRates.length > 1) {
this.currentPlayerMode = 'html5';
// We need to synchronize available frame rates with the ones
// that the user specified.
......
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