想在网页上实现调用电脑上系统麦克风进行录音,请问GO语言改如何去实现这件事,怎么个思路?
https://www.html5rocks.com/en/tutorials/webrtc/basics/#toc-mediastream
function gotStream(stream) {
window.AudioContext = window.AudioContext || window.webkitAudioContext;
var audioContext = new AudioContext();
// Create an AudioNode from the stream
var mediaStreamSource = audioContext.createMediaStreamSource(stream);
// Connect it to destination to hear yourself
// or any other node for processing!
mediaStreamSource.connect(audioContext.destination);
}
navigator.getUserMedia({audio:true}, gotStream);
#3
更多评论
对于支持WebRTC的浏览器,有相关的js接口调用
https://www.webrtc-experiment.com/RecordRTC/
https://webrtc.github.io/samples/
#2