-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmep-head.html
139 lines (85 loc) · 3.35 KB
/
mep-head.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!doctype html><html><meta charset="utf-8" />
<base data-href="../mediaelement-head/" />
<title>*HTML5 MediaElement</title>
<script src="../mediaelement-head/build/jquery.js"></script>
<script src="../mediaelement-head/build/mediaelement-and-player.js"></script>
<script data-src="demo/testforfiles.js"></script>
<link rel="stylesheet" href="../mediaelement-head/build/mediaelementplayer.css" />
<h1>MediaElementPlayer.js - Progress bar # 3</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<p>
<h2> Player 1 (special case) </h2>
<video
id="player-no-speech"
width="640" height="360" controls="controls" preload="none" poster="../mediaelement-head/media/echo-hereweare.jpg">
<!-- MP4 source must come first for iOS -->
<source type="video/mp4" src="../mediaelement-head/media/echo-hereweare.mp4" />
<track kind="subtitles" srclang="en" type="text/vtt" src="../mediaelement-head/media/mediaelement.srt" />
</video>
<span id="player-no-speech-mode"></span>
<h2> Player 2 (default) </h2>
<video
id="player-default"
class="x-mejs-player"
width="640" height="360" controls="controls" preload="none" poster="media/OULIFE_student_00147.jpg">
<source type="video/mp4" src="media/openings-being-an-ou-student.mp4" />
<track kind="subtitles" srclang="en" type="text/vtt" src="media/ou-student-experiences-openings-captions.srt" />
</video>
<script>
$('#player-no-speech').mediaelementplayer({
// This video is a special case.
tracksAriaLive: true,
startLanguage: 'en',
success: function (player, node) {
$('#' + node.id + '-mode').html('mode: ' + player.pluginType);
log(player, mejs);
},
error: function (arg) {
log("Error.", arg);
}
});
$('#player-default').mediaelementplayer({
toggleCaptionsButtonWhenOnlyOne: true
});
// =========================================================
/* FIXES.
*/
$(function () {
if (fixes("TIME_LIVE")) {
$(".mejs-time-slider").attr("aria-live", "off");
log("Fix", "mejs-time-slider: aria-live=off");
}
if (fixes("CAPTIONS_LIVE")) {
// Special case!
$("#mep_0 .mejs-captions-layer > div").attr({
"aria-live": "assertive",
"role": "log",
"aria-atomic": false,
"data-TEST": 1
});
// Default!
$("#mep_1 .mejs-captions-layer > div").attr({
"aria-live": "off",
"role": "",
"aria-atomic": "",
"data-TEST": 2
});
log("Fixes", "mejs-captions..: aria-live=off");
}
function fixes(test) {
var re = new RegExp("fix=[^&]*(" + test + "|1)", "i");
return re.exec(window.location.href);
}
});
function log(s) {
window.console && console.log(arguments.length > 1 ? arguments : s);
}
</script>
<pre>
NDF, 12 November 2014.
http://mediaplayer.open.edu/
Special cases:
1. The "subtitles" track is actually a text-audio description track, aimed at those who are blind. It contains text that is timed to be spoken by a screen reader when no one is speaking in the audio track of the video;
2. The listener is struggling to hear the speech in the audio track of the video, for example, because of a strong accent. The listener mutes the audio, and uses TTS to read the subtitles aloud;
3. A special case, where the video does not contain any spoken words, and a "subtitles" track is used to convey information. This is the case for "echo-hereweare.mp4" and "mediaelement.srt".
</pre>
</html>