3

How to play audio with the base64-string in Internet Explorer? Code

audio =   $("#sound1")[0];
audio.src = "data:audio/wav;base64," + reader.result;
// reader.result - строка UklGRhIqBQBXQVZFZm10IBIAAAAHA...
//audio.src = "somerecord.wav";
audio.load();

Works correctly in Chrome, but not in IE. Another way is create file and play it in IE. But how to do that without store file on disk?

Arslan Ali
  • 17,418
  • 8
  • 58
  • 76

1 Answers1

0

If you are looking for an IE alone fix, the below code might help.

window.navigator.msSaveOrOpenBlob(recordedBlob, fileName, { type: recordingType });

where recordedBlob is the blob URL (Using the base64-string you can create one blob URL, a sample for the same is available here),

fileName is the name of the output file &

recordingType could be a JSON value like "audio/mp3"

BogdanC
  • 2,746
  • 2
  • 24
  • 22
Manoj Kapoor
  • 69
  • 1
  • 7