2

I've got a video conference website using aws-chime-sdk-js, and I've got a button that stops the current meeting. The problem is that I can't get the webcam to stop showing itself as recording (led light and red icon), even after following these function calls outlined below:

https://aws.github.io/amazon-chime-sdk-js/modules/faqs.html#after-leaving-a-meeting-the-camera-led-is-still-on-indicating-that-the-camera-has-not-been-released-what-could-be-wrong

const stop = async (meetingId) => {
try {
    const response = await API.post("chime", "/chime/end", {
    body: { meetingId },
    });

    console.log(response);
    // Select no video device (releases any previously selected device)
    meetingSession.audioVideo.chooseVideoInputDevice(null);

    // Stop local video tile (stops sharing the video tile in the meeting)
    meetingSession.audioVideo.stopLocalVideoTile();

    meetingSession.audioVideo.stop();
} catch (e) {
    console.log(e);
}
};

I've even tried releasing the tracks individually with getUserMedia to no avail. Any ideas how to turn off the webcam?

Will Hay
  • 21
  • 3
  • Could it be your microphone being still active? – jkelting Jan 05 '21 at 23:54
  • https://aws.github.io/amazon-chime-sdk-js/modules/faqs.html#after-leaving-a-meeting-the-camera-led-is-still-on-indicating-that-the-camera-has-not-been-released-what-could-be-wrong – jkelting Jan 06 '21 at 00:02

2 Answers2

0

You could reload the window when your component is unmounting, or right after you end the meeting. The action of reloding the page turns off the cam that was already turned on. For example, using javascript.

window.location.reload();
Pepe Alvarez
  • 1,218
  • 1
  • 9
  • 15
0

Ran into this issue as well until I added stopping of audio and video input too. Here's the code I ended up with

  meetingSession.audioVideo.stopVideoInput();
  meetingSession.audioVideo.stopAudioInput();
  meetingSession.audioVideo.stop();
dbish
  • 53
  • 8