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:
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?