% if display_name is not UNDEFINED and display_name is not None:
  <h2> ${display_name} </h2>
% endif

%if settings.MITX_FEATURES.get('USE_YOUTUBE_OBJECT_API') and normal_speed_video_id:
  <object width="640" height="390">
    <param name="movie"
    % 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>
    <embed 
       % if not settings.MITX_FEATURES['STUB_VIDEO_FOR_TESTING']:
       src="https://www.youtube.com/v/${normal_speed_video_id}?version=3&amp;autoplay=1&amp;rel=0"
       % endif
       type="application/x-shockwave-flash"
       allowscriptaccess="always"
       width="640" height="390"></embed>
  </object>
%else:
  <div id="video_${id}"
       class="video"
       data-youtube-id-0-75="${youtube_id_0_75}"
       data-youtube-id-1-0="${youtube_id_1_0}"
       data-youtube-id-1-25="${youtube_id_1_25}"
       data-youtube-id-1-5="${youtube_id_1_5}"
       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">
      <article class="video-wrapper">
        <section class="video-player">
          <div id="${id}"></div>
        </section>
        <section class="video-controls"></section>
      </article>
    </div>
  </div>
%endif

% if source:
<div class="video-sources">
  <p>Download video <a href="${source}">here</a>.</p>
</div>
% endif

% if track:
<div class="video-tracks">
  <p>Download subtitles <a href="${track}">here</a>.</p>
</div>
% endif
