blob: 9dfda34b8225991341d6a49d0a1a84d9cd3c768c (
plain)
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
|
<!DOCTYPE html>
<html>
<head>
<script>
/*
user_pref("media.mediasource.enabled", true);
*/
function boom()
{
var mediaSource = new MediaSource();
var htmlAudio = document.createElement("audio");
htmlAudio.src = URL.createObjectURL(mediaSource);
setTimeout(function() {
var sourceBuffer = mediaSource.addSourceBuffer("video/webm");
mediaSource.removeSourceBuffer(sourceBuffer);
sourceBuffer.remove(0, 0);
}, 0);
}
</script>
</head>
<body onload="boom();"></body>
</html>
|