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
332bfa96
Commit
332bfa96
authored
Oct 01, 2013
by
jmclaus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more explanatory states to the Volume, Fullscreen, HD, and CC controls
parent
a3db5da9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
11 deletions
+20
-11
common/lib/xmodule/xmodule/js/src/video/04_video_control.js
+5
-3
common/lib/xmodule/xmodule/js/src/video/05_video_quality_control.js
+1
-1
common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js
+2
-1
common/lib/xmodule/xmodule/js/src/video/07_video_volume_control.js
+9
-5
common/lib/xmodule/xmodule/js/src/video/08_video_speed_control.js
+1
-1
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
+2
-0
No files found.
common/lib/xmodule/xmodule/js/src/video/04_video_control.js
View file @
332bfa96
...
...
@@ -71,12 +71,12 @@ function () {
// 'Fill screen' (the title attribute is set in video.html template).
state
.
videoControl
.
playPauseEl
.
attr
({
'role'
:
gettext
(
'button'
),
'aria-disabled'
:
'false'
'aria-disabled'
:
false
});
state
.
videoControl
.
fullScreenEl
.
attr
({
'role'
:
gettext
(
'button'
),
'aria-disabled'
:
'false'
'aria-disabled'
:
false
});
// This anchor behaves as a slider named 'video slider'.
...
...
@@ -189,12 +189,14 @@ function () {
this
.
videoControl
.
fullScreenState
=
false
;
fullScreenClassNameEl
.
removeClass
(
'video-fullscreen'
);
this
.
isFullScreen
=
false
;
this
.
videoControl
.
fullScreenEl
.
attr
(
'title'
,
gettext
(
'Fullscreen'
));
this
.
videoControl
.
fullScreenEl
.
attr
(
'title'
,
gettext
(
'Fill browser'
));
this
.
videoControl
.
fullScreenEl
.
text
(
gettext
(
'Fill browser'
));
}
else
{
this
.
videoControl
.
fullScreenState
=
true
;
fullScreenClassNameEl
.
addClass
(
'video-fullscreen'
);
this
.
isFullScreen
=
true
;
this
.
videoControl
.
fullScreenEl
.
attr
(
'title'
,
gettext
(
'Exit fullscreen'
));
this
.
videoControl
.
fullScreenEl
.
text
(
gettext
(
'Exit fullscreen'
));
}
this
.
trigger
(
'videoCaption.resize'
,
null
);
...
...
common/lib/xmodule/xmodule/js/src/video/05_video_quality_control.js
View file @
332bfa96
...
...
@@ -51,7 +51,7 @@ function () {
// (the title attribute is set in video.html template).
state
.
videoQualityControl
.
el
.
attr
({
'role'
:
gettext
(
'button'
),
'aria-disabled'
:
'false'
'aria-disabled'
:
false
});
}
...
...
common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js
View file @
332bfa96
...
...
@@ -62,7 +62,7 @@ function () {
state
.
videoProgressSlider
.
handle
.
attr
({
'role'
:
gettext
(
'slider'
),
'title'
:
'video position'
,
'aria-disabled'
:
'false'
,
'aria-disabled'
:
false
,
'aria-valuetext'
:
getTimeDescription
(
state
.
videoProgressSlider
.
slider
.
slider
(
'option'
,
'value'
))
});
}
...
...
@@ -120,6 +120,7 @@ function () {
}
}
// Returns a string describing the current time of video in hh:mm:ss format.
function
getTimeDescription
(
time
)
{
var
seconds
=
Math
.
floor
(
time
),
minutes
=
Math
.
floor
(
seconds
/
60
),
...
...
common/lib/xmodule/xmodule/js/src/video/07_video_volume_control.js
View file @
332bfa96
...
...
@@ -68,12 +68,12 @@ function () {
// This anchor behaves as a button named 'Volume'.
// (the title attribute is set in video.html template).
var
buttonStr
=
state
.
videoVolumeControl
.
currentVolume
===
0
?
gettext
(
'Volume muted'
)
:
gettext
(
'Volume'
);
state
.
videoVolumeControl
.
buttonEl
.
attr
({
'role'
:
gettext
(
'button'
),
'aria-label'
:
gettext
(
'Volume'
)
,
// Doesn't read the title attribute, why?
'aria-disabled'
:
'false'
'aria-label'
:
buttonStr
,
// Doesn't read the title attribute, why?
'aria-disabled'
:
false
});
//state.videoVolumeControl.buttonEl.attr();
// The anchor representing the slider handle behaves as a slider named
// volume.
...
...
@@ -81,7 +81,7 @@ function () {
state
.
videoVolumeControl
.
volumeSliderHandleEl
.
attr
({
'role'
:
gettext
(
'slider'
),
'title'
:
'volume'
,
'aria-disabled'
:
'false'
,
'aria-disabled'
:
false
,
'aria-valuemin'
:
state
.
videoVolumeControl
.
slider
.
slider
(
'option'
,
'min'
),
'aria-valuemax'
:
state
.
videoVolumeControl
.
slider
.
slider
(
'option'
,
'max'
),
'aria-valuenow'
:
state
.
videoVolumeControl
.
slider
.
slider
(
'option'
,
'value'
),
...
...
@@ -178,6 +178,10 @@ function () {
'aria-valuenow'
:
ui
.
value
,
'aria-valuetext'
:
getVolumeDescription
(
ui
.
value
)
});
this
.
videoVolumeControl
.
buttonEl
.
attr
(
'aria-label'
,
this
.
videoVolumeControl
.
currentVolume
===
0
?
gettext
(
'Volume muted'
)
:
gettext
(
'Volume'
)
);
}
function
toggleMute
(
event
)
{
...
...
@@ -205,7 +209,7 @@ function () {
// Returns a string describing the level of volume.
function
getVolumeDescription
(
vol
)
{
if
(
vol
===
0
)
{
return
'
silent
'
;
return
'
muted
'
;
}
else
if
(
vol
<=
20
)
{
return
'very low'
;
...
...
common/lib/xmodule/xmodule/js/src/video/08_video_speed_control.js
View file @
332bfa96
...
...
@@ -87,7 +87,7 @@ function () {
// (the title attribute is set in video.html template).
state
.
videoSpeedControl
.
el
.
children
(
'a'
).
attr
({
'role'
:
gettext
(
'button'
),
'aria-disabled'
:
'false'
'aria-disabled'
:
false
});
}
...
...
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
View file @
332bfa96
...
...
@@ -599,11 +599,13 @@ function () {
type
=
'hide_transcript'
;
this
.
captionsHidden
=
true
;
this
.
videoCaption
.
hideSubtitlesEl
.
attr
(
'title'
,
gettext
(
'Turn on captions'
));
this
.
videoCaption
.
hideSubtitlesEl
.
text
(
gettext
(
'Turn on captions'
));
this
.
el
.
addClass
(
'closed'
);
}
else
{
type
=
'show_transcript'
;
this
.
captionsHidden
=
false
;
this
.
videoCaption
.
hideSubtitlesEl
.
attr
(
'title'
,
gettext
(
'Turn off captions'
));
this
.
videoCaption
.
hideSubtitlesEl
.
text
(
gettext
(
'Turn off captions'
));
this
.
el
.
removeClass
(
'closed'
);
this
.
videoCaption
.
scrollCaption
();
}
...
...
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