📅  最后修改于: 2022-03-11 15:02:57.683000             🧑  作者: Mango
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();
});