This repository has been archived by the owner on May 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
/
index.html
54 lines (47 loc) · 2.68 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<title>HTML5 Video Closed Captioning Example</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" media="screen" href="css/captions.css"/>
</head>
<body>
<h1>HTML5 Video Closed Captioning Example</h1>
<video controls autobuffer id="videoTest" width="1010" height="464" style="width: 100%; height: auto !important;">
<source src="video/arduino.m4v" type="video/mp4" />
<source src="video/arduino.webm" type="video/webm" />
<source src="video/arduino.ogv" type="video/ogg" />
<!-- Subtitles for this video -->
<track kind="subtitles" src="video/arduino-en.vtt" type="text/vtt" srclang="en" label="English Subtitles" default />
<track kind="subtitles" src="video/arduino-de.vtt" type="text/vtt" srclang="de" label="German Subtitles" />
<track kind="subtitles" src="video/arduino-ja.vtt" type="text/vtt" srclang="ja" label="Japanese Subtitles" />
<!-- TTML Example (not for this video) -->
<!-- I haven't included this file in the repo because it's not publically licenced. Before I do a proper release I'll find a CC / FOSS TTML file. -->
<track kind="subtitles" src="video/ttml-govt.xml" type="application/ttml+xml" srclang="en" label="TTML Example" />
<!-- LRC Example (not for this video) -->
<!-- Adapted from: http://www.stepmania.com/wiki/Song_Lyrics_-_LRC_Format -->
<track kind="descriptions" src="video/example.lrc" type="text/lrc" srclang="en" label="LRC Example" default />
<!-- WebVTT Testing & Examples -->
<track kind="captions" src="video/acid.vtt" type="text/vtt" srclang="en" label="WebVTT Acid Test" />
<track kind="captions" src="video/example.vtt" type="text/vtt" srclang="en" label="WHATWG's WebVTT Example" />
</video>
<p><a href="index.html?debug">WebVTT renderer debug mode</a> | <a href="index.html?boundingBox">Size cues by text bounding box</a> | <a href="index.html?highres">High Resolution Mode</a></p>
<h2 id="mediacontrols">Media Controls</h2>
<!-- Include Captionator -->
<script type="text/javascript" src="js/captionator.js"></script>
<!-- Example Usage -->
<script type="text/javascript" src="js/captionator-example-api.js"></script>
<script type="text/javascript">
window.addEventListener("load",function() {
captionator.captionify(null,null,{
debugMode: !!window.location.search.match(/debug/i),
sizeCuesByTextBoundingBox: !!window.location.search.match(/boundingBox/i),
enableHighResolution: !!window.location.search.match(/highres/i),
});
var videoObject = document.getElementsByTagName("video")[0];
videoObject.volume = 0;
document.body.appendChild(generateMediaControls(videoObject));
},false);
</script>
</body>
</html>