Answers for "Audio Stream from Server through Scoket"

0

Audio Stream from Server through Scoket

mediaRecorder.ondataavailable = function(e) {
  this.chunks.push(e.data);
  if (this.chunks.length >= 700)
  {
      this.sendData(this.chunks);
      this.chunks = [];
  }
};
mediaRecorder.sendData = function(buffer) {
  blob = new Blob(buffer, { 'type' : 'audio/wav' });
  socket.emit('voice', blob);
}
Posted by: Guest on September-03-2021

Code answers related to "Audio Stream from Server through Scoket"

Code answers related to "Javascript"

Browse Popular Code Answers by Language