-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
32 lines (27 loc) · 844 Bytes
/
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>media-stream-transmuxer Demo</title>
</head>
<body>
<video controls id="test-video">
</video>
<ul>
<li><a href="/test/debug.html">Run unit tests in browser.</a></li>
</ul>
<script src="dist/media-stream-transmuxer.js"></script>
<script>
(function(window, XhrStreamer) {
var video = window.video = document.getElementById('test-video');
var streamer = window.streamer = new MediaStreamTransmuxer(video);
streamer.on('supported-formats', function(e) {
var selected = e.detail.supportedFormats[0];
console.log('selecting format:', selected)
streamer.selectFormat(selected);
});
streamer.startStream(window.location.origin + '/oceans.mp4');
}(window, window.XhrStreamer));
</script>
</body>
</html>