[Feature] Add onFinish() callback
Please add onFinish() callback to mp4box. It would be called when:
mp4boxFile.flush() has been called.
last portion of data has been parsed.
onReady() event was dispatched if the moov has been found.
This is needed bcs as of now, its really hard to know if onReady() will be called, or whetever it will never be called after a file has been fragmented and fed to appendMp4BoxBuffer().
From my expierience onReady() fires few milliseconds after last buffer is fed and flush is called which leads to race conditions.
That callback would help a lot
There's no async work in the library so if you've appended all of your buffers and called flush yourself then that would signal that all processing has completed.
Otherwise, only time onFinish would've been called is if you are importing a non-fragmented MP4.