blob: 8a639abc86a13f658cd7db7ec41d7c744dc34fda [file] [log] [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>