想在网页上实现调用电脑上系统麦克风进行录音,请问GO语言改如何去实现这件事,怎么个思路?

mo3fei · · 2357 次点击
czyt
云在青天水在瓶
电脑端写activex组件或者简单的udp消息接收端,网页通过websocket发送消息,电脑端接收处理消息
#1
更多评论
对于支持WebRTC的浏览器,有相关的js接口调用 https://www.webrtc-experiment.com/RecordRTC/ https://webrtc.github.io/samples/
#2
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