1 <canvas id="c"></canvas>2 <script>3 var streamRecorder;4 var streamw = null;5 6 navigator.mozGetUserMedia({audio: true}, gotAudio, function(e){ console.log(e); });7 function gotAudio(stream) {8 streamw = stream;9 var context = new AudioContext();10 var microphone = context.createMediaStreamSource(stream);11 var analyser = context.createAnalyser();12 microphone.connect(analyser);13 analyser.connect(context.destination);14 // mozRequestAnimationFrame(drawAnimation);15 16 // streamRecorder = stream.record();17 18 console.log(stream);19 }20 </script>21
Enlace
El enlace para compartir es: