Skip to content

Commit f1a81ff

Browse files
save file
1 parent 22ac971 commit f1a81ff

File tree

1 file changed

+10
-2
lines changed
  • blog/25-11-15/ffmpeg-in-the-browser/ex/mp4box

1 file changed

+10
-2
lines changed

blog/25-11-15/ffmpeg-in-the-browser/ex/mp4box/ex.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@
88

99
var buf = await input.files[0].arrayBuffer();
1010
buf.fileStart = 0;
11+
var mp4 = MP4Box.createFile();
12+
mp4.onReady = diplsay;
1113
mp4.appendBuffer(buf);
1214

1315
}//onchange
1416

15-
var mp4 = MP4Box.createFile();
16-
mp4.onReady = info=>document.body.append(info.mime+' , '+MediaSource.isTypeSupported(info.mime));
17+
18+
function display(info){
19+
20+
var div = document.createElement('div');
21+
div.append(info.mime+' , '+MediaSource.isTypeSupported(info.mime));
22+
document.body.append(div);
23+
24+
}//display
1725

1826
</script>

0 commit comments

Comments
 (0)