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
44468f84
Commit
44468f84
authored
Jan 20, 2015
by
Syed Hassan Raza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hd button on for default high resolutions
TNL-1202
parent
7aea582a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
+15
-1
common/lib/xmodule/xmodule/js/spec/video/video_quality_control_spec.js
+13
-0
common/lib/xmodule/xmodule/js/src/video/05_video_quality_control.js
+2
-1
No files found.
common/lib/xmodule/xmodule/js/spec/video/video_quality_control_spec.js
View file @
44468f84
...
...
@@ -92,6 +92,19 @@
qualityControl
.
el
.
click
();
expect
(
player
.
setPlaybackQuality
).
toHaveBeenCalledWith
(
'large'
);
});
it
(
'quality control is active if HD is available'
,
function
()
{
player
.
getAvailableQualityLevels
.
andReturn
(
[
'highres'
,
'hd1080'
,
'hd720'
]
);
qualityControl
.
quality
=
'highres'
;
videoPlayer
.
onPlay
();
expect
(
qualityControl
.
el
).
toHaveClass
(
'active'
);
});
});
describe
(
'constructor, HTML5 mode'
,
function
()
{
...
...
common/lib/xmodule/xmodule/js/src/video/05_video_quality_control.js
View file @
44468f84
...
...
@@ -103,6 +103,7 @@ function () {
// HD qualities are available, show video quality control.
if
(
this
.
config
.
availableHDQualities
.
length
>
0
)
{
this
.
trigger
(
'videoQualityControl.showQualityControl'
);
this
.
trigger
(
'videoQualityControl.onQualityChange'
,
this
.
videoQualityControl
.
quality
);
}
// On initialization, force the video quality to be 'large' instead of
// 'default'. Otherwise, the player will sometimes switch to HD
...
...
@@ -115,7 +116,6 @@ function () {
function
onQualityChange
(
value
)
{
var
controlStateStr
;
this
.
videoQualityControl
.
quality
=
value
;
if
(
_
.
contains
(
this
.
config
.
availableHDQualities
,
value
))
{
controlStateStr
=
gettext
(
'HD on'
);
this
.
videoQualityControl
.
el
...
...
@@ -141,6 +141,7 @@ function () {
event
.
preventDefault
();
newQuality
=
isHD
?
'large'
:
'highres'
;
this
.
trigger
(
'videoPlayer.handlePlaybackQualityChange'
,
newQuality
);
}
...
...
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