play audio stream from client

Solutions on MaxInterview for play audio stream from client by the best coders in the world

showing results for - "play audio stream from client"
Merlin
29 Jul 2017
1var audio = document.createElement('audio');
2socket.on('voice', function(arrayBuffer) {
3    var blob = new Blob([arrayBuffer], { 'type' : 'audio/wav' });
4    audio.src = window.URL.createObjectURL(blob);
5    audio.play();
6});