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
media / test / data / mse_player.html [blame]
<!DOCTYPE html>
<html>
<head>
<title>MSE Player</title>
</head>
<body onload="runTest();">
<video controls></video>
<script src='eme_player_js/app_loader.js' type='text/javascript'></script>
<script type="text/javascript">
var video = document.querySelector('video');
// The test completes after media finishes playing all the segments.
// The test stops when an error occurs unexpectedly.
function runTest() {
var testConfig = new TestConfig();
testConfig.loadQueryParams();
if (typeof(testConfig.mediaFile) == "string") {
// Multiple media segments can be passed down separated by ';'
testConfig.mediaFile = testConfig.mediaFile.split(';')
}
Utils.installTitleEventHandler(video, 'error');
Utils.installTitleEventHandler(video, 'ended');
MSEPlayerUtils.loadMediaSegmentsFromTestConfig(testConfig);
video.play();
}
</script>
</body>
</html>