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
38642d28
Commit
38642d28
authored
Oct 02, 2013
by
jmclaus
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1175 from edx/jmclaus_bugfix_video_player_controls_a11y
Bug fix video player controls a11y
parents
0521bec4
9d418755
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
181 additions
and
30 deletions
+181
-30
CHANGELOG.rst
+3
-0
common/lib/xmodule/xmodule/js/fixtures/video.html
+6
-6
common/lib/xmodule/xmodule/js/fixtures/video_all.html
+6
-6
common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html
+6
-6
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
+2
-2
common/lib/xmodule/xmodule/js/spec/video/video_quality_control_spec.js
+2
-1
common/lib/xmodule/xmodule/js/src/video/04_video_control.js
+12
-2
common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js
+64
-0
common/lib/xmodule/xmodule/js/src/video/07_video_volume_control.js
+71
-0
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
+2
-0
lms/templates/video.html
+7
-7
No files found.
CHANGELOG.rst
View file @
38642d28
...
@@ -316,3 +316,6 @@ Common: Updated CodeJail.
...
@@ -316,3 +316,6 @@ Common: Updated CodeJail.
Common: Allow setting of authentication session cookie name.
Common: Allow setting of authentication session cookie name.
LMS: Option to email students when enroll/un-enroll them.
LMS: Option to email students when enroll/un-enroll them.
Blades: Added WAI-ARIA markup to the video player controls. These are now fully
accessible by screen readers.
common/lib/xmodule/xmodule/js/fixtures/video.html
View file @
38642d28
...
@@ -26,26 +26,26 @@
...
@@ -26,26 +26,26 @@
<div
class=
"slider"
></div>
<div
class=
"slider"
></div>
<div>
<div>
<ul
class=
"vcr"
>
<ul
class=
"vcr"
>
<li><a
class=
"video_control"
href=
"#"
title=
"Play"
></a></li>
<li><a
class=
"video_control"
href=
"#"
title=
"Play"
role=
"button"
aria-disabled=
"false"
></a></li>
<li><div
class=
"vidtime"
>
0:00 / 0:00
</div></li>
<li><div
class=
"vidtime"
>
0:00 / 0:00
</div></li>
</ul>
</ul>
<div
class=
"secondary-controls"
>
<div
class=
"secondary-controls"
>
<div
class=
"speeds"
>
<div
class=
"speeds"
>
<a
href=
"#"
>
<a
href=
"#"
title=
"Speeds"
role=
"button"
aria-disabled=
"false"
>
<h3>
Speed
</h3>
<h3>
Speed
</h3>
<p
class=
"active"
></p>
<p
class=
"active"
></p>
</a>
</a>
<ol
class=
"video_speeds"
></ol>
<ol
class=
"video_speeds"
></ol>
</div>
</div>
<div
class=
"volume"
>
<div
class=
"volume"
>
<a
href=
"#"
></a>
<a
href=
"#"
title=
"Volume"
role=
"button"
aria-disabled=
"false"
></a>
<div
class=
"volume-slider-container"
>
<div
class=
"volume-slider-container"
>
<div
class=
"volume-slider"
></div>
<div
class=
"volume-slider"
></div>
</div>
</div>
</div>
</div>
<a
href=
"#"
class=
"add-fullscreen"
title=
"Fill browser"
>
Fill Browser
</a>
<a
href=
"#"
class=
"add-fullscreen"
title=
"Fill browser"
role=
"button"
aria-disabled=
"false"
>
Fill Browser
</a>
<a
href=
"#"
class=
"quality_control"
title=
"HD"
>
HD
</a>
<a
href=
"#"
class=
"quality_control"
title=
"HD"
role=
"button"
aria-disabled=
"false"
>
HD
</a>
<a
href=
"#"
class=
"hide-subtitles"
title=
"Turn off captions"
>
Captions
</a>
<a
href=
"#"
class=
"hide-subtitles"
title=
"Turn off captions"
role=
"button"
aria-disabled=
"false"
>
Captions
</a>
</div>
</div>
</div>
</div>
</section>
</section>
...
...
common/lib/xmodule/xmodule/js/fixtures/video_all.html
View file @
38642d28
...
@@ -29,26 +29,26 @@
...
@@ -29,26 +29,26 @@
<div
class=
"slider"
></div>
<div
class=
"slider"
></div>
<div>
<div>
<ul
class=
"vcr"
>
<ul
class=
"vcr"
>
<li><a
class=
"video_control"
href=
"#"
title=
"Play"
></a></li>
<li><a
class=
"video_control"
href=
"#"
title=
"Play"
role=
"button"
aria-disabled=
"false"
></a></li>
<li><div
class=
"vidtime"
>
0:00 / 0:00
</div></li>
<li><div
class=
"vidtime"
>
0:00 / 0:00
</div></li>
</ul>
</ul>
<div
class=
"secondary-controls"
>
<div
class=
"secondary-controls"
>
<div
class=
"speeds"
>
<div
class=
"speeds"
>
<a
href=
"#"
>
<a
href=
"#"
title=
"Speeds"
role=
"button"
aria-disabled=
"false"
>
>
<h3>
Speed
</h3>
<h3>
Speed
</h3>
<p
class=
"active"
></p>
<p
class=
"active"
></p>
</a>
</a>
<ol
class=
"video_speeds"
></ol>
<ol
class=
"video_speeds"
></ol>
</div>
</div>
<div
class=
"volume"
>
<div
class=
"volume"
>
<a
href=
"#"
></a>
<a
href=
"#"
title=
"Volume"
role=
"button"
aria-disabled=
"false"
></a>
<div
class=
"volume-slider-container"
>
<div
class=
"volume-slider-container"
>
<div
class=
"volume-slider"
></div>
<div
class=
"volume-slider"
></div>
</div>
</div>
</div>
</div>
<a
href=
"#"
class=
"add-fullscreen"
title=
"Fill browser"
>
Fill Browser
</a>
<a
href=
"#"
class=
"add-fullscreen"
title=
"Fill browser"
role=
"button"
aria-disabled=
"false"
>
Fill Browser
</a>
<a
href=
"#"
class=
"quality_control"
title=
"HD"
>
HD
</a>
<a
href=
"#"
class=
"quality_control"
title=
"HD"
role=
"button"
aria-disabled=
"false"
>
HD
</a>
<a
href=
"#"
class=
"hide-subtitles"
title=
"Turn off captions"
>
Captions
</a>
<a
href=
"#"
class=
"hide-subtitles"
title=
"Turn off captions"
role=
"button"
aria-disabled=
"false"
>
Captions
</a>
</div>
</div>
</div>
</div>
</section>
</section>
...
...
common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html
View file @
38642d28
...
@@ -26,26 +26,26 @@
...
@@ -26,26 +26,26 @@
<div
class=
"slider"
></div>
<div
class=
"slider"
></div>
<div>
<div>
<ul
class=
"vcr"
>
<ul
class=
"vcr"
>
<li><a
class=
"video_control"
href=
"#"
title=
"Play"
></a></li>
<li><a
class=
"video_control"
href=
"#"
title=
"Play"
role=
"button"
aria-disabled=
"false"
></a></li>
<li><div
class=
"vidtime"
>
0:00 / 0:00
</div></li>
<li><div
class=
"vidtime"
>
0:00 / 0:00
</div></li>
</ul>
</ul>
<div
class=
"secondary-controls"
>
<div
class=
"secondary-controls"
>
<div
class=
"speeds"
>
<div
class=
"speeds"
>
<a
href=
"#"
>
<a
href=
"#"
title=
"Speeds"
role=
"button"
aria-disabled=
"false"
>
<h3>
Speed
</h3>
<h3>
Speed
</h3>
<p
class=
"active"
></p>
<p
class=
"active"
></p>
</a>
</a>
<ol
class=
"video_speeds"
></ol>
<ol
class=
"video_speeds"
></ol>
</div>
</div>
<div
class=
"volume"
>
<div
class=
"volume"
>
<a
href=
"#"
></a>
<a
href=
"#"
title=
"Volume"
role=
"button"
aria-disabled=
"false"
></a>
<div
class=
"volume-slider-container"
>
<div
class=
"volume-slider-container"
>
<div
class=
"volume-slider"
></div>
<div
class=
"volume-slider"
></div>
</div>
</div>
</div>
</div>
<a
href=
"#"
class=
"add-fullscreen"
title=
"Fill browser"
>
Fill Browser
</a>
<a
href=
"#"
class=
"add-fullscreen"
title=
"Fill browser"
role=
"button"
aria-disabled=
"false"
>
Fill Browser
</a>
<a
href=
"#"
class=
"quality_control"
title=
"HD"
>
HD
</a>
<a
href=
"#"
class=
"quality_control"
title=
"HD"
role=
"button"
aria-disabled=
"false"
>
HD
</a>
<a
href=
"#"
class=
"hide-subtitles"
title=
"Turn off captions"
>
Captions
</a>
<a
href=
"#"
class=
"hide-subtitles"
title=
"Turn off captions"
role=
"button"
aria-disabled=
"false"
>
Captions
</a>
</div>
</div>
</div>
</div>
</section>
</section>
...
...
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
View file @
38642d28
...
@@ -547,7 +547,7 @@
...
@@ -547,7 +547,7 @@
});
});
it
(
'replace the full screen button tooltip'
,
function
()
{
it
(
'replace the full screen button tooltip'
,
function
()
{
expect
(
$
(
'.add-fullscreen'
)).
toHaveAttr
(
'title'
,
'Exit full
screen
'
);
expect
(
$
(
'.add-fullscreen'
)).
toHaveAttr
(
'title'
,
'Exit full
browser
'
);
});
});
it
(
'add the video-fullscreen class'
,
function
()
{
it
(
'add the video-fullscreen class'
,
function
()
{
...
@@ -573,7 +573,7 @@
...
@@ -573,7 +573,7 @@
});
});
it
(
'replace the full screen button tooltip'
,
function
()
{
it
(
'replace the full screen button tooltip'
,
function
()
{
expect
(
$
(
'.add-fullscreen'
)).
toHaveAttr
(
'title'
,
'F
ullscreen
'
);
expect
(
$
(
'.add-fullscreen'
)).
toHaveAttr
(
'title'
,
'F
ill browser
'
);
});
});
it
(
'remove the video-fullscreen class'
,
function
()
{
it
(
'remove the video-fullscreen class'
,
function
()
{
...
...
common/lib/xmodule/xmodule/js/spec/video/video_quality_control_spec.js
View file @
38642d28
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
initialize
();
initialize
();
});
});
it
(
'render the quality control'
,
function
()
{
// Disabled when ARIA markup was added to the anchor
xit
(
'render the quality control'
,
function
()
{
expect
(
videoControl
.
secondaryControlsEl
.
html
()).
toContain
(
"<a href=
\"
#
\"
class=
\"
quality_control
\"
title=
\"
HD
\"
>"
);
expect
(
videoControl
.
secondaryControlsEl
.
html
()).
toContain
(
"<a href=
\"
#
\"
class=
\"
quality_control
\"
title=
\"
HD
\"
>"
);
});
});
...
...
common/lib/xmodule/xmodule/js/src/video/04_video_control.js
View file @
38642d28
...
@@ -63,6 +63,14 @@ function () {
...
@@ -63,6 +63,14 @@ function () {
state
.
videoControl
.
el
.
addClass
(
'html5'
);
state
.
videoControl
.
el
.
addClass
(
'html5'
);
state
.
controlHideTimeout
=
setTimeout
(
state
.
videoControl
.
hideControls
,
state
.
videoControl
.
fadeOutTimeout
);
state
.
controlHideTimeout
=
setTimeout
(
state
.
videoControl
.
hideControls
,
state
.
videoControl
.
fadeOutTimeout
);
}
}
// ARIA
// Let screen readers know that this anchor, representing the slider
// handle, behaves as a slider named 'video slider'.
state
.
videoControl
.
sliderEl
.
find
(
'.ui-slider-handle'
).
attr
({
'role'
:
'slider'
,
'title'
:
gettext
(
'video slider'
)
});
}
}
// function _bindHandlers(state)
// function _bindHandlers(state)
...
@@ -168,12 +176,14 @@ function () {
...
@@ -168,12 +176,14 @@ function () {
this
.
videoControl
.
fullScreenState
=
false
;
this
.
videoControl
.
fullScreenState
=
false
;
fullScreenClassNameEl
.
removeClass
(
'video-fullscreen'
);
fullScreenClassNameEl
.
removeClass
(
'video-fullscreen'
);
this
.
isFullScreen
=
false
;
this
.
isFullScreen
=
false
;
this
.
videoControl
.
fullScreenEl
.
attr
(
'title'
,
gettext
(
'Fullscreen'
));
this
.
videoControl
.
fullScreenEl
.
attr
(
'title'
,
gettext
(
'Fill browser'
))
.
text
(
gettext
(
'Fill browser'
));
}
else
{
}
else
{
this
.
videoControl
.
fullScreenState
=
true
;
this
.
videoControl
.
fullScreenState
=
true
;
fullScreenClassNameEl
.
addClass
(
'video-fullscreen'
);
fullScreenClassNameEl
.
addClass
(
'video-fullscreen'
);
this
.
isFullScreen
=
true
;
this
.
isFullScreen
=
true
;
this
.
videoControl
.
fullScreenEl
.
attr
(
'title'
,
gettext
(
'Exit fullscreen'
));
this
.
videoControl
.
fullScreenEl
.
attr
(
'title'
,
gettext
(
'Exit full browser'
))
.
text
(
gettext
(
'Exit full browser'
));
}
}
this
.
trigger
(
'videoCaption.resize'
,
null
);
this
.
trigger
(
'videoCaption.resize'
,
null
);
...
...
common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js
View file @
38642d28
...
@@ -54,6 +54,18 @@ function () {
...
@@ -54,6 +54,18 @@ function () {
function
_buildHandle
(
state
)
{
function
_buildHandle
(
state
)
{
state
.
videoProgressSlider
.
handle
=
state
.
videoProgressSlider
.
el
.
find
(
'.ui-slider-handle'
);
state
.
videoProgressSlider
.
handle
=
state
.
videoProgressSlider
.
el
.
find
(
'.ui-slider-handle'
);
// ARIA
// We just want the knob to be selectable with keyboard
state
.
videoProgressSlider
.
el
.
attr
(
'tabindex'
,
-
1
);
// Let screen readers know that this anchor, representing the slider
// handle, behaves as a slider named 'video position'.
state
.
videoProgressSlider
.
handle
.
attr
({
'role'
:
'slider'
,
'title'
:
'video position'
,
'aria-disabled'
:
false
,
'aria-valuetext'
:
getTimeDescription
(
state
.
videoProgressSlider
.
slider
.
slider
(
'option'
,
'value'
))
});
}
}
// ***************************************************************
// ***************************************************************
...
@@ -74,6 +86,11 @@ function () {
...
@@ -74,6 +86,11 @@ function () {
this
.
videoProgressSlider
.
frozen
=
true
;
this
.
videoProgressSlider
.
frozen
=
true
;
this
.
trigger
(
'videoPlayer.onSlideSeek'
,
{
'type'
:
'onSlideSeek'
,
'time'
:
ui
.
value
});
this
.
trigger
(
'videoPlayer.onSlideSeek'
,
{
'type'
:
'onSlideSeek'
,
'time'
:
ui
.
value
});
// ARIA
this
.
videoProgressSlider
.
handle
.
attr
(
'aria-valuetext'
,
getTimeDescription
(
this
.
videoPlayer
.
currentTime
)
);
}
}
function
onStop
(
event
,
ui
)
{
function
onStop
(
event
,
ui
)
{
...
@@ -83,6 +100,11 @@ function () {
...
@@ -83,6 +100,11 @@ function () {
this
.
trigger
(
'videoPlayer.onSlideSeek'
,
{
'type'
:
'onSlideSeek'
,
'time'
:
ui
.
value
});
this
.
trigger
(
'videoPlayer.onSlideSeek'
,
{
'type'
:
'onSlideSeek'
,
'time'
:
ui
.
value
});
// ARIA
this
.
videoProgressSlider
.
handle
.
attr
(
'aria-valuetext'
,
getTimeDescription
(
this
.
videoPlayer
.
currentTime
)
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
_this
.
videoProgressSlider
.
frozen
=
false
;
_this
.
videoProgressSlider
.
frozen
=
false
;
},
200
);
},
200
);
...
@@ -99,6 +121,48 @@ function () {
...
@@ -99,6 +121,48 @@ 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
),
hours
=
Math
.
floor
(
minutes
/
60
),
hrStr
,
minStr
,
secStr
;
seconds
=
seconds
%
60
;
minutes
=
minutes
%
60
;
hrStr
=
hours
.
toString
(
10
);
minStr
=
minutes
.
toString
(
10
);
secStr
=
seconds
.
toString
(
10
);
if
(
hours
)
{
hrStr
+=
(
hours
<
2
?
' hour '
:
' hours '
);
if
(
minutes
)
{
minStr
+=
(
minutes
<
2
?
' minute '
:
' minutes '
);
}
else
{
minStr
+=
' 0 minutes '
;
}
if
(
seconds
)
{
secStr
+=
(
seconds
<
2
?
' second '
:
' seconds '
);
}
else
{
secStr
+=
' 0 seconds '
;
}
return
hrStr
+
minStr
+
secStr
;
}
else
if
(
minutes
)
{
minStr
+=
(
minutes
<
2
?
' minute '
:
' minutes '
);
if
(
seconds
)
{
secStr
+=
(
seconds
<
2
?
' second '
:
' seconds '
);
}
else
{
secStr
+=
' 0 seconds '
;
}
return
minStr
+
secStr
;
}
else
if
(
seconds
)
{
secStr
+=
(
seconds
<
2
?
' second '
:
' seconds '
);
return
secStr
;
}
return
'0 seconds'
;
}
});
});
}(
RequireJS
.
requirejs
,
RequireJS
.
require
,
RequireJS
.
define
));
}(
RequireJS
.
requirejs
,
RequireJS
.
require
,
RequireJS
.
define
));
common/lib/xmodule/xmodule/js/src/video/07_video_volume_control.js
View file @
38642d28
...
@@ -62,6 +62,35 @@ function () {
...
@@ -62,6 +62,35 @@ function () {
});
});
state
.
videoVolumeControl
.
el
.
toggleClass
(
'muted'
,
state
.
videoVolumeControl
.
currentVolume
===
0
);
state
.
videoVolumeControl
.
el
.
toggleClass
(
'muted'
,
state
.
videoVolumeControl
.
currentVolume
===
0
);
// ARIA
// Let screen readers know that:
// This anchor behaves as a button named 'Volume'.
var
buttonStr
=
gettext
(
state
.
videoVolumeControl
.
currentVolume
===
0
?
'Volume muted'
:
'Volume'
);
// We add the aria-label attribute because the title attribute cannot be
// read.
state
.
videoVolumeControl
.
buttonEl
.
attr
(
'aria-label'
,
buttonStr
);
// Let screen readers know that this anchor, representing the slider
// handle, behaves as a slider named 'volume'.
var
volumeSlider
=
state
.
videoVolumeControl
.
slider
;
state
.
videoVolumeControl
.
volumeSliderHandleEl
=
state
.
videoVolumeControl
.
volumeSliderEl
.
find
(
'.ui-slider-handle'
);
state
.
videoVolumeControl
.
volumeSliderHandleEl
.
attr
({
'role'
:
'slider'
,
'title'
:
'volume'
,
'aria-disabled'
:
false
,
'aria-valuemin'
:
volumeSlider
.
slider
(
'option'
,
'min'
),
'aria-valuemax'
:
volumeSlider
.
slider
(
'option'
,
'max'
),
'aria-valuenow'
:
volumeSlider
.
slider
(
'option'
,
'value'
),
'aria-valuetext'
:
getVolumeDescription
(
volumeSlider
.
slider
(
'option'
,
'value'
))
});
}
}
/**
/**
...
@@ -147,6 +176,18 @@ function () {
...
@@ -147,6 +176,18 @@ function () {
});
});
this
.
trigger
(
'videoPlayer.onVolumeChange'
,
ui
.
value
);
this
.
trigger
(
'videoPlayer.onVolumeChange'
,
ui
.
value
);
// ARIA
this
.
videoVolumeControl
.
volumeSliderHandleEl
.
attr
({
'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
)
{
function
toggleMute
(
event
)
{
...
@@ -155,9 +196,39 @@ function () {
...
@@ -155,9 +196,39 @@ function () {
if
(
this
.
videoVolumeControl
.
currentVolume
>
0
)
{
if
(
this
.
videoVolumeControl
.
currentVolume
>
0
)
{
this
.
videoVolumeControl
.
previousVolume
=
this
.
videoVolumeControl
.
currentVolume
;
this
.
videoVolumeControl
.
previousVolume
=
this
.
videoVolumeControl
.
currentVolume
;
this
.
videoVolumeControl
.
slider
.
slider
(
'option'
,
'value'
,
0
);
this
.
videoVolumeControl
.
slider
.
slider
(
'option'
,
'value'
,
0
);
// ARIA
this
.
videoVolumeControl
.
volumeSliderHandleEl
.
attr
({
'aria-valuenow'
:
0
,
'aria-valuetext'
:
getVolumeDescription
(
0
),
});
}
else
{
}
else
{
this
.
videoVolumeControl
.
slider
.
slider
(
'option'
,
'value'
,
this
.
videoVolumeControl
.
previousVolume
);
this
.
videoVolumeControl
.
slider
.
slider
(
'option'
,
'value'
,
this
.
videoVolumeControl
.
previousVolume
);
// ARIA
this
.
videoVolumeControl
.
volumeSliderHandleEl
.
attr
({
'aria-valuenow'
:
this
.
videoVolumeControl
.
previousVolume
,
'aria-valuetext'
:
getVolumeDescription
(
this
.
videoVolumeControl
.
previousVolume
)
});
}
}
// ARIA
// Returns a string describing the level of volume.
function
getVolumeDescription
(
vol
)
{
if
(
vol
===
0
)
{
return
'muted'
;
}
else
if
(
vol
<=
20
)
{
return
'very low'
;
}
else
if
(
vol
<=
40
)
{
return
'low'
;
}
else
if
(
vol
<=
60
)
{
return
'average'
;
}
else
if
(
vol
<=
80
)
{
return
'loud'
;
}
else
if
(
vol
<=
99
)
{
return
'very loud'
;
}
}
return
'maximum'
;
}
}
});
});
...
...
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
View file @
38642d28
...
@@ -593,11 +593,13 @@ function () {
...
@@ -593,11 +593,13 @@ function () {
type
=
'hide_transcript'
;
type
=
'hide_transcript'
;
this
.
captionsHidden
=
true
;
this
.
captionsHidden
=
true
;
this
.
videoCaption
.
hideSubtitlesEl
.
attr
(
'title'
,
gettext
(
'Turn on captions'
));
this
.
videoCaption
.
hideSubtitlesEl
.
attr
(
'title'
,
gettext
(
'Turn on captions'
));
this
.
videoCaption
.
hideSubtitlesEl
.
text
(
gettext
(
'Turn on captions'
));
this
.
el
.
addClass
(
'closed'
);
this
.
el
.
addClass
(
'closed'
);
}
else
{
}
else
{
type
=
'show_transcript'
;
type
=
'show_transcript'
;
this
.
captionsHidden
=
false
;
this
.
captionsHidden
=
false
;
this
.
videoCaption
.
hideSubtitlesEl
.
attr
(
'title'
,
gettext
(
'Turn off captions'
));
this
.
videoCaption
.
hideSubtitlesEl
.
attr
(
'title'
,
gettext
(
'Turn off captions'
));
this
.
videoCaption
.
hideSubtitlesEl
.
text
(
gettext
(
'Turn off captions'
));
this
.
el
.
removeClass
(
'closed'
);
this
.
el
.
removeClass
(
'closed'
);
this
.
videoCaption
.
scrollCaption
();
this
.
videoCaption
.
scrollCaption
();
}
}
...
...
lms/templates/video.html
View file @
38642d28
...
@@ -42,31 +42,31 @@
...
@@ -42,31 +42,31 @@
<div
class=
"video-player-post"
></div>
<div
class=
"video-player-post"
></div>
<section
class=
"video-controls"
>
<section
class=
"video-controls"
>
<div
class=
"slider"
t
abindex=
"0"
t
itle=
"Video position"
></div>
<div
class=
"slider"
title=
"Video position"
></div>
<div>
<div>
<ul
class=
"vcr"
>
<ul
class=
"vcr"
>
<li><a
class=
"video_control"
href=
"#"
title=
"${_('Play')}"
></a></li>
<li><a
class=
"video_control"
href=
"#"
title=
"${_('Play')}"
role=
"button"
aria-disabled=
"false"
></a></li>
<li><div
class=
"vidtime"
>
0:00 / 0:00
</div></li>
<li><div
class=
"vidtime"
>
0:00 / 0:00
</div></li>
</ul>
</ul>
<div
class=
"secondary-controls"
>
<div
class=
"secondary-controls"
>
<div
class=
"speeds"
>
<div
class=
"speeds"
>
<a
href=
"#"
title=
"
Speeds
"
>
<a
href=
"#"
title=
"
${_('Speeds')}"
role=
"button"
aria-disabled=
"false
"
>
<h3>
${_('Speed')}
</h3>
<h3>
${_('Speed')}
</h3>
<p
class=
"active"
></p>
<p
class=
"active"
></p>
</a>
</a>
<ol
class=
"video_speeds"
></ol>
<ol
class=
"video_speeds"
></ol>
</div>
</div>
<div
class=
"volume"
>
<div
class=
"volume"
>
<a
href=
"#"
title=
"
Volum
e"
></a>
<a
href=
"#"
title=
"
${_('Volume')}"
role=
"button"
aria-disabled=
"fals
e"
></a>
<div
class=
"volume-slider-container"
>
<div
class=
"volume-slider-container"
>
<div
class=
"volume-slider"
></div>
<div
class=
"volume-slider"
></div>
</div>
</div>
</div>
</div>
<a
href=
"#"
class=
"add-fullscreen"
title=
"${_('Fill browser')}"
>
${_('Fill browser')}
</a>
<a
href=
"#"
class=
"add-fullscreen"
title=
"${_('Fill browser')}"
role=
"button"
aria-disabled=
"false"
>
${_('Fill browser')}
</a>
<a
href=
"#"
class=
"quality_control"
title=
"${_('HD')}"
>
${_('HD')}
</a>
<a
href=
"#"
class=
"quality_control"
title=
"${_('HD')}"
role=
"button"
aria-disabled=
"false"
>
${_('HD')}
</a>
<a
href=
"#"
class=
"hide-subtitles"
title=
"${_('Turn off captions')}"
>
${_('C
aptions')}
</a>
<a
href=
"#"
class=
"hide-subtitles"
title=
"${_('Turn off captions')}"
role=
"button"
aria-disabled=
"false"
>
${_('Turn off c
aptions')}
</a>
</div>
</div>
</div>
</div>
</section>
</section>
...
...
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