Fix Firefox YouTube default Flash mode
BLD-895
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user