简体   繁体   中英

AWS Chime SDK: How to leave a meeting

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

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

I found the answer. Key context is:

  • When in a video session Chrome displays the camera icon铬相机图标 and the 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镀铬记录图标 icon disappeared.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM