Microphone activity level of WebRTC MediaStream

前端 未结 3 363
不思量自难忘°
不思量自难忘° 2020-12-28 19:08

I would like some advice on how best to get the microphone activity level of an audio MediaStreamTrack javascript object in Chrome/Canary. The MediaStrea

3条回答
  •  孤城傲影
    2020-12-28 19:23

    UPDATE: modified the code using:

    navigator.mediaDevices.getUserMedia(constraints).then(
        function(stream){
            // code ... 
        }).catch(function(err) {
            // code ... 
    });
    

    Here is a fiddle: https://jsfiddle.net/elshnkhll/p07e5vcq/

提交回复
热议问题