Remove red icon after recording has stopped

后端 未结 3 1591
醉梦人生
醉梦人生 2021-01-06 08:45

I am using recording.js. The functionality is working fine but after I stop recording the red icon still appears in chrome\'s tab(near title). Please suggest what to do. So

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-06 09:17

    To remove red icon after using Recorder.js:

    var audioStream;    
    var onSuccess = function(s) {
        ...
        audioStream = s;
    }
    
    function stopRecording() {
       ...
       audioStream.getTracks()[0].stop();
    }
    

    getTracks() returns only one element since you use only audio in your config.

    I hope it will help someone.

提交回复
热议问题