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
24a63dad
Commit
24a63dad
authored
Feb 18, 2015
by
Shrhawk
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6694 from edx/shr/bug/TNL-1202-HD-button-not-working-properly
Hd button on for default high resolutions
parents
132cadb5
44468f84
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 @
24a63dad
...
@@ -92,6 +92,19 @@
...
@@ -92,6 +92,19 @@
qualityControl
.
el
.
click
();
qualityControl
.
el
.
click
();
expect
(
player
.
setPlaybackQuality
).
toHaveBeenCalledWith
(
'large'
);
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
()
{
describe
(
'constructor, HTML5 mode'
,
function
()
{
...
...
common/lib/xmodule/xmodule/js/src/video/05_video_quality_control.js
View file @
24a63dad
...
@@ -103,6 +103,7 @@ function () {
...
@@ -103,6 +103,7 @@ function () {
// HD qualities are available, show video quality control.
// HD qualities are available, show video quality control.
if
(
this
.
config
.
availableHDQualities
.
length
>
0
)
{
if
(
this
.
config
.
availableHDQualities
.
length
>
0
)
{
this
.
trigger
(
'videoQualityControl.showQualityControl'
);
this
.
trigger
(
'videoQualityControl.showQualityControl'
);
this
.
trigger
(
'videoQualityControl.onQualityChange'
,
this
.
videoQualityControl
.
quality
);
}
}
// On initialization, force the video quality to be 'large' instead of
// On initialization, force the video quality to be 'large' instead of
// 'default'. Otherwise, the player will sometimes switch to HD
// 'default'. Otherwise, the player will sometimes switch to HD
...
@@ -115,7 +116,6 @@ function () {
...
@@ -115,7 +116,6 @@ function () {
function
onQualityChange
(
value
)
{
function
onQualityChange
(
value
)
{
var
controlStateStr
;
var
controlStateStr
;
this
.
videoQualityControl
.
quality
=
value
;
this
.
videoQualityControl
.
quality
=
value
;
if
(
_
.
contains
(
this
.
config
.
availableHDQualities
,
value
))
{
if
(
_
.
contains
(
this
.
config
.
availableHDQualities
,
value
))
{
controlStateStr
=
gettext
(
'HD on'
);
controlStateStr
=
gettext
(
'HD on'
);
this
.
videoQualityControl
.
el
this
.
videoQualityControl
.
el
...
@@ -141,6 +141,7 @@ function () {
...
@@ -141,6 +141,7 @@ function () {
event
.
preventDefault
();
event
.
preventDefault
();
newQuality
=
isHD
?
'large'
:
'highres'
;
newQuality
=
isHD
?
'large'
:
'highres'
;
this
.
trigger
(
'videoPlayer.handlePlaybackQualityChange'
,
newQuality
);
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