How to remove camera icon from the browser address bar even after closing the video streams

95 views Asked by At

I have tried using this code to remove icon of camera and microphone that appeared in browser even after closing the stream

enter image description here

var videoTrack = this.localStream.getVideoTracks()[0]
    if(videoTrack){
      this.localStream.removeTrack(videoTrack)
      videoTrack.stop()
    }

    var audioTrack = this.localStream.getAudioTracks()[0]
    if(audioTrack){
      this.localStream.removeTrack(audioTrack)
      audioTrack.stop()
    }

Also, I tried. But no luck.

this.localStream.getTracks().forEach((track => {
        track.stop();
      }))

How can i remove these icons from browser.

I am using webRTC

0

There are 0 answers