-1

I've a React JS App that uses the Chime SDK. I've literally followed the explanation here and i can successfully hold a meeting with two attendees. My issue is the behaviour when one of the participants leaves the meeting.

My references are:

  • This link states "To stop the meeting session, call meetingSession.audioVideo.stop()."
  • This link states "You start tearing down a session by calling stop on the AudioVideoFacade .... this.audioVideo.stop();"

When i run meetingSession.audioVideo.stop() the attendee appears to leave the meeting (their audio and video stops) - which makes sense. My issues are:

  1. Locally, the attendee's audio and video are still showing as active in the browser. How do i release them? I've tried setting the meetingSession object to null but it didn't work
  2. If i then run meetingSession.audioVideo.start() the attendee rejoins the meeting but with a new Tile ID. Why isn't the same Tile ID used if the Attendee is the same?

Overall it seems my issues all relate to being unclear how to leave a meeting and a) be removed from the meeting roster and b) release objects locally in the browser.

Thanks in advance

Kevin
  • 169
  • 2
  • 9

2 Answers2

2

I found the answer. Key context is:

  • When in a video session Chrome displays the camera icon chrome camera icon and the record icon chrome record icon
  • The camera icon displays when a page has permission to use video
  • The record icon displays when a page is using the video

In my previous post i was expecting both icons to disappear after leaving a session, however, the camera icon always remains because the permission remains.

There was one other bit of information missing. The docs state you should run meetingSession.audioVideo.stop() but this is incomplete. The FAQs also state that you should run:

  • meetingSession.audioVideo.chooseVideoInputDevice(null);
  • meetingSession.audioVideo.stopLocalVideoTile();
  • meetingSession.audioVideo.stopVideoPreviewForVideoInput(previewVideoElement);

BEFORE running meetingSession.audioVideo.stop(). Doing this fixed the issue and the chrome record icon icon disappeared.

Point 2 above regarding the Tile ID is still unclear but this is likely a separate issue.

Kevin
  • 169
  • 2
  • 9
0

Probably also calling audioVideoFacade.unbindAudioElement() would help to unbind the audio element to the stream ?

See https://aws.github.io/amazon-chime-sdk-js/interfaces/audiomixcontrollerfacade.html#unbindaudioelement

David Ly-Gagnon
  • 411
  • 4
  • 15
  • 1
    Please don't write answers in a way that makes them look like questions. There are systems in place to check for Not An Answer (NAA) posts. This answer was falsely picked up by one of them. Please consider editing it to look more like an answer. Rephrase the "Probably also calling audioVideoFacade.unbindAudioElement() would help to unbind the audio element to the stream ?" line – Sabito stands with Ukraine Nov 12 '20 at 01:14