Copied autoplay attribute from video xmoudle to videoalpha. Now students will have the video autoplaying, and in Studio it will be pause by default.

This commit is contained in:
Valera Rozuvan
2013-06-07 17:35:57 +03:00
parent 9e0997d3c8
commit 66e106a9e2
2 changed files with 2 additions and 1 deletions

View File

@@ -99,7 +99,7 @@ class @VideoPlayerAlpha extends SubviewAlpha
@video.log 'load_video'
if @video.videoType is 'html5'
@player.setPlaybackRate @video.speed
unless onTouchBasedDevice()
unless onTouchBasedDevice() or $('.video:first').data('autoplay') == 'False'
$('.video-load-complete:first').data('video').player.play()
onStateChange: (event) =>

View File

@@ -18,6 +18,7 @@
data-start="${start}"
data-end="${end}"
data-caption-asset-path="${caption_asset_path}"
data-autoplay="${settings.MITX_FEATURES['AUTOPLAY_VIDEOS']}"
>
<div class="tc-wrapper">
<article class="video-wrapper">