Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
cf47f522
Commit
cf47f522
authored
Mar 06, 2014
by
Valera Rozuvan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Firefox YouTube default Flash mode
BLD-895
parent
c85905d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletions
+22
-1
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
+19
-0
common/lib/xmodule/xmodule/js/src/video/03_video_player.js
+3
-1
No files found.
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
View file @
cf47f522
...
...
@@ -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
()
{
...
...
common/lib/xmodule/xmodule/js/src/video/03_video_player.js
View file @
cf47f522
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment