csobrien90 / band-book

GNU General Public License v3.0
2 stars 0 forks source link

BandBook Import does not work with large tracks #23

Open csobrien90 opened 2 weeks ago

csobrien90 commented 2 weeks ago

Background/Context

When importing an exported BandBook json file, very large audio tracks will not successful import. With commit 02ddeea9c4f2ace17aa78f337444eced38557144, the bug was at least caught and the song source skipped. Ideally, though, any size track would work the same through all features.

Technical Notes

This is breaking because of the hard length/heap limit placed on JS arrays (112813858). It's possible this could be fixed by chunking and/or streaming the data. There may be a novel/creative solution here, too. The only thing that is breaking is the import feature - because that is the only place that (on import) attempts to convert the base64 stringified source to an ArrayBuffer (before it gets converted to a Blob URL in the Player). Some possible places to start with this one:

Acceptance Criteria