We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03dbe26 commit 0f57925Copy full SHA for 0f57925
blog/25-11-15/ffmpeg-in-the-browser/ex/mp4box/ex.html
@@ -1,12 +1,18 @@
1
2
<input id=input type=file><br><br>
3
<script type=module>
4
- import MP4Box from 'https://cdn.jsdelivr.net/npm/mp4box/+esm';
+
5
+ import * as MP4Box from 'https://cdn.jsdelivr.net/npm/mp4box/+esm';
6
7
input.onchange = async e=>{
8
9
var buf = await input.files[0].arrayBuffer();
10
buf.fileStart = 0;
11
mp4.appendBuffer(buf);
12
13
}//onchange
14
15
var mp4 = MP4Box.createFile();
16
mp4.onReady = info=>document.body.append(info.mime+' , '+MediaSource.isTypeSupported(info.mime));
17
18
</script>
0 commit comments