How to convert "arraybuffer" to "string" and vice versa?

1

I'm making a mobile app in HTML5 and need to store data from MP3 files and bitmap images in localStorage. The problem is that you only have to store String so I need to convert a buffer to String to stock and then the opposite to retrieve.

I tried these two answers (first and second) , but I was not successful.

The first of the error

  

Uncaught RangeError: Maximum call stack size exceededtestaudio.html: 37   ab2strtestaudio.html: 63 (anonymous function) XMLHttpRequest.send   (async) testaudio.html: 132 loadSongtestaudio.html: 136 (anonymous   function)

The second one does not error but the audio does not play.

Example of how my code is

    
asked by anonymous 29.03.2015 / 21:26

0 answers