Convert Blob to DataURL in JavaScript

I have a variable blobthat represents an audio file. When this code is executed, the actual data url string is written to the console, but it is very small and only works in chrome, the browser probably stores it somewhere. Is it possible to convert it to a data url string that contains all the audio data? In addition, everything works correctly on other machines.

     var reader = new FileReader();
     reader.readAsDataURL(blob); 
     reader.onloadend = function() {
                    base64data = reader.result;                
                    console.log( base64data );
      }

Thanks.

+4
source share

Source: https://habr.com/ru/post/1605900/


All Articles