I am creating a chrome extension that loads files from disk and plays music in the background.
I have a popup.html page that has an input element that loads audio files, converts them into dataURL and sends it to the background page, which is loaded into an audio element.
Now chrome doesn’t allow me to directly access the file from disk through the background page. also, I’m not allowed to send the file from the popup to the background page directly. I can’t use chrome.storage as a means of transferring the files also. so the only thing i can do is convert to dataURl and send.(if there are any other means of file transfer. please let me know)
the problem is when I select a lot of music files, the dataURL strings take up a lot of memory. this could cause performance issues, especially on systems with low ram.
so whats the most memory efficient way to send, store and load these audio files?
and also I tried using chrome.storage but there was a problem with the quota management.
anyways thanks for all the help!