D
D
Demon2018-01-07 14:31:17
Python
Demon, 2018-01-07 14:31:17

Save mp3 to memory?

Is it possible to save mp3 files locally in js and then load them from memory for playback. Maybe there are libraries for this or a demo.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2018-01-07
@Stalker_RED

If it is in memory (which will be reset when the page is updated), then you can pump up 2-3 gigabytes until the tab crashes.
If you are talking about "normal js in the browser", then you can save it in localStorage, but there is 5mb-10mb if the user did not twist the settings.
For "js in extensions" there is no such limit, and you can request a large amount. https://developer.chrome.com/apps/offline_storage#table
And Node.js has access to the file system.

A
Anton Bobylev, 2018-01-07
@dpigo

Depends what you call "memory"
One can use File api https://developer.mozilla.org/en-US/docs/Web/API/File
One can use IndexDB https://developer.mozilla.org/en- US/docs/Web/API/I...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question