I record audio by sending it as a blob to a nodejs server. The nodejs server then sends it to all connected users who are not currently writing.
Sending blob:
mediaRecorder.onstop = function(e) {
var blob = new Blob(this.chunks, { 'type' : 'audio/ogg; codecs=opus' });
socket.emit('radio', blob);
};
Server receiving blob:
socket.on('radio', function(blob) {
socket.broadcast.emit('voice', blob);
});
Listener receiving blob:
socket.on('voice', function(arrayBuffer) {
var blob = new Blob([arrayBuffer], { 'type' : 'audio/ogg; codecs=opus' });
var audio = document.getElementById('audio');
audio.src = window.URL.createObjectURL(blob);
audio.play();
});
This works in all browsers / devices except safari and any ios device. Taking this further with the safari inspector, I found this:

Does safari need anything else in its headers to correctly interpret blob objects? I studied the accepted types of audio, tried aac / mp3 / ogg without any success. When reading further, I heard links to the fact that in safari and IOS there is an error with streaming audio / video blob data, although I do not understand the details too clearly.
Guidance in the direction of the rite will be very helpful!
EDIT: , audio.src = window.URL.createObjectURL(blob); - , blob ( i)
2: , , blob, base64. , , IOS Safari. , - , IOS / ...