Multimedia Player - Video
Overview
For video, the multimedia player leverages the native HTML5 video
tag. The MPEG 4 format (H264 codec) is the minimum requirement for video because it is the standard video format on many browsers. An optional but highly recommended format, Webm (VP8 codec), should be added as well to allow some browsers such as Firefox that do not include native support for H264 to leverage the native HTML5 performance gains.
The multimedia player's timeline relies on the HTML5 progress
element and uses a polyfill when the element is not supported.
Examples
All video examples use native HTML5 video on most modern browsers including Firefox 6+, Google Chrome 3+ and IE9.
MPEG4 (H264 + AAC) and WebM (VP8) source and HTML captions
View code
In-page HTML
<figure class="wb-mltmd" data-wb-mltmd='{"shareUrl": "https://wet-boew.github.io/v4.0-ci/demos/multimedia/multimedia-en.html"}'>
<video poster="demo/video1-en.jpg" title="Looking for a Job">
<source type="video/webm" src="http://video2.servicecanada.gc.ca/video/boew-wet/te-lj-eng.webm" />
<source type="video/mp4" src="http://video2.servicecanada.gc.ca/video/boew-wet/te-lj-eng.mp4" />
<track src="cpts-lg-en.html" kind="captions" data-type="text/html" srclang="en" label="English" />
</video>
<figcaption>
<p>Looking for a Job (<a href="cpts-lg-en.html">Transcript</a>)</p>
</figcaption>
</figure>
cpts-lg-en.html
<div id="inline-captions">
<section>
<h2>Transcript</h2>
<p class="wb-vd"><strong>(Animated pen draws a red line that leads into the text Looking for A Job)</strong></p>
<p class="wb-vd"><strong>(Cut to a medium shot of the Host. LINE DRAWING GRAPHIC: Stick person appears and waves.)</strong></p>
<p><span class="wb-tmtxt" data-begin="2.50s" data-dur="3.84s">Hi, my name is Eric, and I'm a Service Canada employee.</span></p>
...
</section>
</div>
MPEG4 (H264 + AAC) and WebM (VP8) source and HTML captions
View code
In-page HTML
<figure class="wb-mltmd" data-wb-mltmd='{"shareUrl": "https://wet-boew.github.io/v4.0-ci/demos/multimedia/multimedia-en.html"}'>
<video poster="demo/video2-en.jpg" title="Training and Development">
<source type="video/webm" src="http://video2.servicecanada.gc.ca/video/boew-wet/dc-td-eng.webm" />
<source type="video/mp4" src="http://video2.servicecanada.gc.ca/video/boew-wet/dc-td-eng.mp4" />
<track src="cpts-lg2-en.html" kind="captions" data-type="text/html" srclang="en" label="English" />
</video>
<figcaption>
<p>Training and Development (<a href="cpts-lg2-en.html">Transcript</a>)</p>
</figcaption>
</figure>
cpts-lg2-en.html
<div id="inline-captions">
<section>
<h2>Transcript</h2>
<p class="wb-vd" data-load="vd"><strong>(Animated pen draws a red line that leads into the text Training and development.)</strong></p>
<p><span class="wb-tmtxt" data-begin="1.40s" data-dur="3.33s" data-load="tt">Hi, my name is Eric, and I'm a Service Canada employee.</span></p>
<p class="wb-vd" data-load="vd"><strong>(Cut to a close-up of the Host.)</strong></p>
...
</section>
</div>
MPEG4 (H264 + AAC) source with inline HTML captions
This example illustrates the use of an inline transcript to provide captions. This example can also demonstrate the fallback mechanism in Web browsers that don't support HTML5 videos.
View code
<figure class="wb-mltmd">
<video poster="demo/video1-en.jpg" title="Looking for a Job">
<source type="video/mp4" src="http://video2.servicecanada.gc.ca/video/boew-wet/te-lj-eng.mp4" />
<track src="#inline-captions" kind="captions" data-type="text/html" srclang="en" label="English" />
</video>
<figcaption>
<details id="inline-captions">
<summary>Looking for a Job - HTML5 Transcript/Captions</summary>
<p class="wet-boew-vd"><strong>(Animated pen draws a red line that leads into the text Looking for A Job)</strong></p>
<p class="wet-boew-vd"><strong>(Cut to a medium shot of the Host. LINE DRAWING GRAPHIC: Stick person appears and waves.)</strong></p>
<p><span class="wb-tmtxt" data-begin="2.50s" data-dur="3.84s">Hi, my name is Eric, and I'm a Service Canada employee.</span></p>
...
</details>
</figcaption>
</figure>
MPEG4 (H264 + AAC) source with cue points
This example illustrates the use of buttons to navigate to specific cue points within the video.
View code
<figure class="wb-mltmd">
<video poster="demo/video1-en.jpg" title="Looking for a Job">
<source type="video/mp4" src="http://video2.servicecanada.gc.ca/video/boew-wet/te-lj-eng.mp4" />
<track src="#inline-captions" kind="captions" data-type="text/html" srclang="en" label="English" />
</video>
<button class="btn btn-info cuepoint" data-cuepoint="45s" type="button">Cue point - 45s</button>
<button class="btn btn-info cuepoint" data-cuepoint="01:10" type="button">Cue point - 01:10</button>
<figcaption>
<p>Looking for a Job (<a href="cpts-lg-en.html">Transcript</a>)</p>
</figcaption>
</figure>
- Date modified: