gpac / mp4box.js

JavaScript version of GPAC's MP4Box tool
https://gpac.github.io/mp4box.js/
BSD 3-Clause "New" or "Revised" License
1.94k stars 326 forks source link

nothing happened when pass a WebM file (expect at least onError to be called) #292

Open Jonham opened 1 year ago

Jonham commented 1 year ago

hi, I've passed a webm video file to mp4box, and nothing has happened. (I expect onError to be called.) so I checked the source code and found that onError never be called.

It's this a bug ? or by design it works this way? should I check video file MIME type before passing it to mp4box ?

    /* Callback to call when there is an error in the parsing or processing of samples */
    this.onError = null;

https://github.com/gpac/mp4box.js/blob/a2909aec4fbce46310584694669705b236b2447d/src/isofile.js#L31

bamtheboozle commented 1 year ago

would be useful to have this. if you download a webm file, manually change extension to .mp4, then try to append its buffer -> nothing happens.

would be good to have onError called in this instance