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
d52329be
Commit
d52329be
authored
Jun 13, 2013
by
Peter Fogg
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #128 from edx/peter-fogg/fix-video-captions-setting
Make video captions respect course author's setting.
parents
25aec96e
45527bf9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
cms/djangoapps/contentstore/features/video.feature
+5
-0
cms/djangoapps/contentstore/features/video.py
+10
-0
common/lib/xmodule/xmodule/js/src/video/display.coffee
+2
-2
No files found.
cms/djangoapps/contentstore/features/video.feature
View file @
d52329be
...
...
@@ -8,3 +8,8 @@ Feature: Video Component
Scenario
:
Creating a video takes a single click
Given
I have clicked the new unit button
Then
creating a video takes a single click
Scenario
:
Captions are shown correctly
Given
I have created a Video component
And
I have hidden captions
Then
when I view the video it does not show the captions
cms/djangoapps/contentstore/features/video.py
View file @
d52329be
...
...
@@ -16,3 +16,13 @@ def video_takes_a_single_click(step):
assert
(
not
world
.
is_css_present
(
'.xmodule_VideoModule'
))
world
.
css_click
(
"a[data-location='i4x://edx/templates/video/default']"
)
assert
(
world
.
is_css_present
(
'.xmodule_VideoModule'
))
@step
(
'I have hidden captions'
)
def
set_show_captions_false
(
step
):
world
.
css_click
(
'a.hide-subtitles'
)
@step
(
'when I view the video it does not show the captions'
)
def
does_not_show_captions
(
step
):
assert
world
.
css_find
(
'.video'
)[
0
]
.
has_class
(
'closed'
)
common/lib/xmodule/xmodule/js/src/video/display.coffee
View file @
d52329be
...
...
@@ -5,7 +5,7 @@ class @Video
@
start
=
@
el
.
data
(
'start'
)
@
end
=
@
el
.
data
(
'end'
)
@
caption_asset_path
=
@
el
.
data
(
'caption-asset-path'
)
@
show_captions
=
@
el
.
data
(
'show-captions'
)
==
"true"
@
show_captions
=
@
el
.
data
(
'show-captions'
)
window
.
player
=
null
@
el
=
$
(
"#video_
#{
@
id
}
"
)
@
parseVideos
@
el
.
data
(
'streams'
)
...
...
@@ -13,7 +13,7 @@ class @Video
@
parseSpeed
()
$
(
"#video_
#{
@
id
}
"
).
data
(
'video'
,
this
).
addClass
(
'video-load-complete'
)
@
hide_captions
=
$
.
cookie
(
'hide_captions'
)
==
'true'
@
hide_captions
=
$
.
cookie
(
'hide_captions'
)
==
'true'
or
(
not
@
show_captions
)
if
YT
.
Player
@
embed
()
...
...
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