Remove red icon after recording has stopped

后端 未结 3 1581
醉梦人生
醉梦人生 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.

    0 讨论(0)
  • 2021-01-06 09:24

    You can end the stream directly using the stream object returned in the success handler to getUserMedia. Example

     localMediaStream.stop()
    
    0 讨论(0)
  • 2021-01-06 09:25

    It's a browser feature, not a site feature. It will be there until you close the tab, indicates that "This tab has access to or using microphone or webcam".

    At the time of writing the answer there were no way to remove that icon. You may now can remove it after the recording has stopped. Check @akaravashkin 's answer, I haven't tested it.

    0 讨论(0)
提交回复
热议问题