Commit b1c963ab by Will Daly

Changed stubbing behavior in video templates to exclude

only the sources (not the player)
parent 6ab5bb2f
...@@ -2,37 +2,33 @@ ...@@ -2,37 +2,33 @@
<h2> ${display_name} </h2> <h2> ${display_name} </h2>
% endif % endif
%if settings.MITX_FEATURES['STUB_VIDEO_FOR_TESTING']: %if settings.MITX_FEATURES.get('USE_YOUTUBE_OBJECT_API') and normal_speed_video_id:
<div id="stub_out_video_for_testing">
<div class="video" data-autoplay="${settings.MITX_FEATURES['AUTOPLAY_VIDEOS']}">
<section class="video-controls">
<div class="slider"></div>
<div>
<ul class="vcr">
<li><a class="video_control" href="#"></a></li>
<li>
<div class="vidtime">0:00 / 0:00</div>
</li>
</ul>
<div class="secondary-controls">
<a href="#" class="add-fullscreen" title="Fill browser">Fill Browser</a>
</div>
</div>
</section>
</div>
</div>
%elif settings.MITX_FEATURES.get('USE_YOUTUBE_OBJECT_API') and normal_speed_video_id:
<object width="640" height="390"> <object width="640" height="390">
<param name="movie" <param name="movie"
value="https://www.youtube.com/v/${normal_speed_video_id}?version=3&amp;autoplay=1&amp;rel=0"></param> % if not settings.MITX_FEATURES['STUB_VIDEO_FOR_TESTING']:
value="https://www.youtube.com/v/${normal_speed_video_id}?version=3&amp;autoplay=1&amp;rel=0">
% endif
</param>
<param name="allowScriptAccess" value="always"></param> <param name="allowScriptAccess" value="always"></param>
<embed src="https://www.youtube.com/v/${normal_speed_video_id}?version=3&amp;autoplay=1&amp;rel=0" <embed
type="application/x-shockwave-flash" % if not settings.MITX_FEATURES['STUB_VIDEO_FOR_TESTING']:
allowscriptaccess="always" src="https://www.youtube.com/v/${normal_speed_video_id}?version=3&amp;autoplay=1&amp;rel=0"
width="640" height="390"></embed> % endif
type="application/x-shockwave-flash"
allowscriptaccess="always"
width="640" height="390"></embed>
</object> </object>
%else: %else:
<div id="video_${id}" class="video" data-streams="${streams}" data-show-captions="${show_captions}" data-start="${start}" data-end="${end}" data-caption-asset-path="${caption_asset_path}" data-autoplay="${settings.MITX_FEATURES['AUTOPLAY_VIDEOS']}"> <div id="video_${id}" class="video"
% if not settings.MITX_FEATURES['STUB_VIDEO_FOR_TESTING']:
data-streams="${streams}"
% endif
data-show-captions="${show_captions}"
data-start="${start}" data-end="${end}"
data-caption-asset-path="${caption_asset_path}"
data-autoplay="${settings.MITX_FEATURES['AUTOPLAY_VIDEOS']}">
<div class="tc-wrapper"> <div class="tc-wrapper">
<article class="video-wrapper"> <article class="video-wrapper">
<section class="video-player"> <section class="video-player">
......
...@@ -5,7 +5,11 @@ ...@@ -5,7 +5,11 @@
<div <div
id="video_${id}" id="video_${id}"
class="video" class="video"
% if not settings.MITX_FEATURES['STUB_VIDEO_FOR_TESTING']:
data-streams="${youtube_streams}" data-streams="${youtube_streams}"
% endif
${'data-sub="{}"'.format(sub) if sub else ''} ${'data-sub="{}"'.format(sub) if sub else ''}
% if not settings.MITX_FEATURES['STUB_VIDEO_FOR_TESTING']: % if not settings.MITX_FEATURES['STUB_VIDEO_FOR_TESTING']:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment