2

I'm using Sinch javascript SDK to build a browser to browser video calling app. When the video call is ended with a call to call.hangup(); in chrome (at least) the red camera icon is still visible with the message "This tab is using your camera or microphone".

How can I hide this warning after the call has ended? Is there a call in the Sinch SDK I should be making, or something in the underlying WebRTC framework?

Jonny Leigh
  • 125
  • 2
  • 7
  • I found this github comment to be helpful: https://github.com/streamproc/MediaStreamRecorder/issues/76#issuecomment-198257580 – raksheetbhat Apr 12 '19 at 08:17

2 Answers2

5

You need to ensure that all MediaStreamTracks are stopped. If you have access to the stream from getUserMedia, doing this should help: stream.getTracks().forEach(t => t.stop())

Philipp Hancke
  • 15,855
  • 2
  • 23
  • 31
0

I found the following was required: sinchClient.stopActiveConnection();

Jonny Leigh
  • 125
  • 2
  • 7