Disabled video autoplay for students
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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', True),
|
||||
'autoplay': settings.MITX_FEATURES.get('AUTOPLAY_VIDEOS', False),
|
||||
'yt_test_timeout': 1500,
|
||||
'yt_test_url': 'https://gdata.youtube.com/feeds/api/videos/'
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ class VideoModuleUnitTest(unittest.TestCase):
|
||||
'sources': sources,
|
||||
'youtube_streams': _create_youtube_string(module),
|
||||
'track': '',
|
||||
'autoplay': settings.MITX_FEATURES.get('AUTOPLAY_VIDEOS', True),
|
||||
'autoplay': settings.MITX_FEATURES.get('AUTOPLAY_VIDEOS', False),
|
||||
'yt_test_timeout': 1500,
|
||||
'yt_test_url': 'https://gdata.youtube.com/feeds/api/videos/'
|
||||
}
|
||||
|
||||
@@ -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': True,
|
||||
# Don't autoplay videos for students
|
||||
'AUTOPLAY_VIDEOS': False,
|
||||
|
||||
# Enable instructor dash to submit background tasks
|
||||
'ENABLE_INSTRUCTOR_BACKGROUND_TASKS': True,
|
||||
|
||||
Reference in New Issue
Block a user