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
1c7d821c
Commit
1c7d821c
authored
Sep 20, 2013
by
jmclaus
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1041 from edx/jmclaus/bugfix_disable_video_autoplay_lms
Disabled video autoplay for students
parents
c65e21c7
66bd8127
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
10 deletions
+13
-10
common/lib/xmodule/xmodule/js/src/video/03_video_player.js
+3
-0
common/lib/xmodule/xmodule/video_module.py
+1
-1
lms/djangoapps/courseware/features/video.feature
+2
-2
lms/djangoapps/courseware/features/video.py
+3
-3
lms/djangoapps/courseware/tests/test_video_mongo.py
+1
-1
lms/djangoapps/courseware/tests/test_video_xml.py
+1
-1
lms/envs/common.py
+2
-2
No files found.
common/lib/xmodule/xmodule/js/src/video/03_video_player.js
View file @
1c7d821c
...
...
@@ -420,12 +420,15 @@ function (HTML5Video) {
this
.
videoPlayer
.
player
.
setPlaybackRate
(
this
.
speed
);
}
/* The following has been commented out to make sure autoplay is
disabled for students.
if (
!onTouchBasedDevice() &&
$('.video:first').data('autoplay') === 'True'
) {
this.videoPlayer.play();
}
*/
}
function
onStateChange
(
event
)
{
...
...
common/lib/xmodule/xmodule/video_module.py
View file @
1c7d821c
...
...
@@ -188,7 +188,7 @@ class VideoModule(VideoFields, XModule):
'show_captions'
:
json
.
dumps
(
self
.
show_captions
),
'start'
:
self
.
start_time
,
'end'
:
self
.
end_time
,
'autoplay'
:
settings
.
MITX_FEATURES
.
get
(
'AUTOPLAY_VIDEOS'
,
Tru
e
),
'autoplay'
:
settings
.
MITX_FEATURES
.
get
(
'AUTOPLAY_VIDEOS'
,
Fals
e
),
# TODO: Later on the value 1500 should be taken from some global
# configuration setting field.
'yt_test_timeout'
:
1500
,
...
...
lms/djangoapps/courseware/features/video.feature
View file @
1c7d821c
...
...
@@ -8,9 +8,9 @@ Feature: Video component
# Firefox doesn't have HTML5 (only mp4 - fix here)
@skip_firefox
Scenario
:
Autoplay is
en
abled in LMS for a Video component
Scenario
:
Autoplay is
dis
abled in LMS for a Video component
Given
the course has a Video component in HTML5 mode
Then
when I view the video it
has
autoplay enabled
Then
when I view the video it
does not have
autoplay enabled
# Youtube testing
Scenario
:
Video component is fully rendered in the LMS in Youtube mode with HTML5 sources
...
...
lms/djangoapps/courseware/features/video.py
View file @
1c7d821c
...
...
@@ -16,9 +16,9 @@ HTML5_SOURCES_INCORRECT = [
'https://s3.amazonaws.com/edx-course-videos/edx-intro/edX-FA12-cware-1_100.mp99'
]
@step
(
'when I view the (.*) it
has
autoplay enabled$'
)
def
does_
autoplay_video
(
_step
,
video_type
):
assert
(
world
.
css_find
(
'.
%
s'
%
video_type
)[
0
][
'data-autoplay'
]
==
'
Tru
e'
)
@step
(
'when I view the (.*) it
does not have
autoplay enabled$'
)
def
does_
not_autoplay
(
_step
,
video_type
):
assert
(
world
.
css_find
(
'.
%
s'
%
video_type
)[
0
][
'data-autoplay'
]
==
'
Fals
e'
)
@step
(
'the course has a Video component in (.*) mode$'
)
...
...
lms/djangoapps/courseware/tests/test_video_mongo.py
View file @
1c7d821c
...
...
@@ -61,7 +61,7 @@ class TestVideo(BaseTestXmodule):
'sub'
:
u'a_sub_file.srt.sjson'
,
'track'
:
''
,
'youtube_streams'
:
_create_youtube_string
(
self
.
item_module
),
'autoplay'
:
settings
.
MITX_FEATURES
.
get
(
'AUTOPLAY_VIDEOS'
,
Tru
e
),
'autoplay'
:
settings
.
MITX_FEATURES
.
get
(
'AUTOPLAY_VIDEOS'
,
Fals
e
),
'yt_test_timeout'
:
1500
,
'yt_test_url'
:
'https://gdata.youtube.com/feeds/api/videos/'
}
...
...
lms/djangoapps/courseware/tests/test_video_xml.py
View file @
1c7d821c
...
...
@@ -94,7 +94,7 @@ class VideoModuleUnitTest(unittest.TestCase):
'sources'
:
sources
,
'youtube_streams'
:
_create_youtube_string
(
module
),
'track'
:
''
,
'autoplay'
:
settings
.
MITX_FEATURES
.
get
(
'AUTOPLAY_VIDEOS'
,
Tru
e
),
'autoplay'
:
settings
.
MITX_FEATURES
.
get
(
'AUTOPLAY_VIDEOS'
,
Fals
e
),
'yt_test_timeout'
:
1500
,
'yt_test_url'
:
'https://gdata.youtube.com/feeds/api/videos/'
}
...
...
lms/envs/common.py
View file @
1c7d821c
...
...
@@ -144,8 +144,8 @@ MITX_FEATURES = {
# Toggle to indicate use of a custom theme
'USE_CUSTOM_THEME'
:
False
,
# Do autoplay videos for students
'AUTOPLAY_VIDEOS'
:
Tru
e
,
# Do
n't
autoplay videos for students
'AUTOPLAY_VIDEOS'
:
Fals
e
,
# Enable instructor dash to submit background tasks
'ENABLE_INSTRUCTOR_BACKGROUND_TASKS'
:
True
,
...
...
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