Answers for "Play Audio Stream from Client"

0

Play Audio Stream from Client

var audio = document.createElement('audio');
socket.on('voice', function(arrayBuffer) {
    var blob = new Blob([arrayBuffer], { 'type' : 'audio/wav' });
    audio.src = window.URL.createObjectURL(blob);
    audio.play();
});
Posted by: Guest on September-03-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language