Skip to content

Commit

Permalink
Update replicated_meetings.md (aws#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
hensmi-amazon authored May 12, 2022
1 parent 80c9a5e commit 6b1ef98
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions guides/replicated_meetings.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Although application builders should already be aware of when attendees are in a

## Low latency promotion of Replica meeting attendees into the Primary meeting

Applications may want to allow Replica attendees to authenticate against and participate in the Primary meeting by sharing audio, video and data messages without needing to incur the latency of leaving the Replica meeting and joining the Primary meeting. This may, for example, be used for Town Hall-style events where normal participants may be given the opportunity to ask their question to participants in the Primary meeting. The Amazon Chime SDK for Javascript provides a set of APIs for low latency promotions of Replica attendees: [`promoteToPrimaryMeeting`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/AudioVideoControllerFacade.html#/c:@M@AmazonChimeSDK@objc(pl)AudioVideoControllerFacade(im)promoteToPrimaryMeetingWithCredentials:) and [`demoteFromPrimaryMeeting`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/AudioVideoControllerFacade.html#/c:@M@AmazonChimeSDK@objc(pl)AudioVideoControllerFacade(im)demoteFromPrimaryMeeting).
Applications may want to allow Replica attendees to authenticate against and participate in the Primary meeting by sharing audio, video and data messages without needing to incur the latency of leaving the Replica meeting and joining the Primary meeting. This may, for example, be used for Town Hall-style events where normal participants may be given the opportunity to ask their question to participants in the Primary meeting. The Amazon Chime SDK for Javascript provides a set of APIs for low latency promotions of Replica attendees: [`promoteToPrimaryMeeting`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/AudioVideoControllerFacade.html#/c:@M@AmazonChimeSDK@objc(pl)AudioVideoControllerFacade(im)promoteToPrimaryMeetingWithCredentials:observer:) and [`demoteFromPrimaryMeeting`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/AudioVideoControllerFacade.html#/c:@M@AmazonChimeSDK@objc(pl)AudioVideoControllerFacade(im)demoteFromPrimaryMeeting).

### Promotion of Replica attendees

Expand All @@ -82,18 +82,18 @@ const credentials = configuration.credentials
meetingSession.audioVideo.promoteToPrimaryMeeting(credentials: credentials, observer: self)
```

[`promoteToPrimaryMeeting`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/AudioVideoControllerFacade.html#/c:@M@AmazonChimeSDK@objc(pl)AudioVideoControllerFacade(im)promoteToPrimaryMeetingWithCredentials:) takes a [`PrimaryMeetingPromotionObserver`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/PrimaryMeetingPromotionObserver.html) which will have [`didPromoteToPrimaryMeeting:status`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/RealtimeObserver.html#/c:@M@AmazonChimeSDK@objc(pl)PrimaryMeetingPromotionObserver(im)didPromoteToPrimaryMeetingWithStatus:) called with one of a few statuses covered in documentation. If status.code is [`MeetingSessionStatusCode.ok`](https://aws.github.io/amazon-chime-sdk-ios/Enums/MeetingSessionStatusCode.html#/c:@M@AmazonChimeSDK@E@MeetingSessionStatusCode@MeetingSessionStatusCodeOk), the connection has successfully authenticated as a Primary meeting attendee and the attendee experience should now be as if you had joined the Primary meeting directly. This means:
[`promoteToPrimaryMeeting`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/AudioVideoControllerFacade.html#/c:@M@AmazonChimeSDK@objc(pl)AudioVideoControllerFacade(im)promoteToPrimaryMeetingWithCredentials:observer:) takes a [`PrimaryMeetingPromotionObserver`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/PrimaryMeetingPromotionObserver.html) which will have [`didPromoteToPrimaryMeeting:status`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/PrimaryMeetingPromotionObserver.html#/c:@M@AmazonChimeSDK@objc(pl)PrimaryMeetingPromotionObserver(im)didPromoteToPrimaryMeetingWithStatus:) called with one of a few statuses covered in documentation. If status.code is [`MeetingSessionStatusCode.ok`](https://aws.github.io/amazon-chime-sdk-ios/Enums/MeetingSessionStatusCode.html#/c:@M@AmazonChimeSDK@E@MeetingSessionStatusCode@MeetingSessionStatusCodeOk), the connection has successfully authenticated as a Primary meeting attendee and the attendee experience should now be as if you had joined the Primary meeting directly. This means:

* Audio captured and transmitted will now be shared with the Primary meeting and all Replica meetings. Attendee presence, volume, and signal strength callbacks for the promoted attendee on all Primary and Replica meeting attendees will be labeled with the attendee associated with the credentials provided to addPrimaryMeetingCredentials.
* Audio captured and transmitted will now be shared with the Primary meeting and all Replica meetings. Attendee presence, volume, and signal strength callbacks for the promoted attendee on all Primary and Replica meeting attendees will be labeled with the attendee associated with the credentials provided to [`promoteToPrimaryMeeting`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/AudioVideoControllerFacade.html#/c:@M@AmazonChimeSDK@objc(pl)AudioVideoControllerFacade(im)promoteToPrimaryMeetingWithCredentials:observer:).
* If there is video source capacity in the Primary meeting, [`videoSessionDidStartWithStatus`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/AudioVideoObserver.html#/c:@M@AmazonChimeSDK@objc(pl)AudioVideoObserver(im)videoSessionDidStartWithStatusWithSessionStatus:) will be called again without [`MeetingSessionStatusCode.VideoAtCapacityViewOnly`](https://aws.github.io/amazon-chime-sdk-ios/Enums/MeetingSessionStatusCode.html#/c:@M@AmazonChimeSDK@E@MeetingSessionStatusCode@MeetingSessionStatusCodeVideoAtCapacityViewOnly). Video can then be enabled as normally done in the conference. In the same way as audio, this video will be associated with the Primary meeting attendee.
* Data messages sent via [`realtimeSendDataMessage`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/RealtimeControllerFacade.html#/c:@M@AmazonChimeSDK@objc(pl)RealtimeControllerFacade(im)realtimeSendDataMessageWithTopic:data:lifetimeMs:error:) will be forwarded to all Primary and Replica meeting attendees. They will also be associated with the Primary meeting attendee.

Builders should be considerate of these changes by showing UI related to video enable/disable, audio mute/unmute, etc. on promoted attendees.

### Demotion of promoted Replica attendees

A promoted attendee can be considered as authenticated in two meetings, as two attendees, at the same time. However with regards to their connection to the Amazon Chime SDK servers, their 'root' connection is as a Replica attendee, and thus there are three ways for the attendee to 'revert' to a view-only, Replica meeting attendee with behavior explained in earlier sections. (i.e. demotion will lead to audio, video, and data messages ceasing to be forwarded from the client). All demotions will result in a call to [`didDemoteFromPrimaryMeeting:status`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/RealtimeObserver.html#/c:@M@AmazonChimeSDK@objc(pl)PrimaryMeetingPromotionObserver(im)didPromoteToPrimaryMeetingWithStatus:) with a corresponding status code.
A promoted attendee can be considered as authenticated in two meetings, as two attendees, at the same time. However with regards to their connection to the Amazon Chime SDK servers, their 'root' connection is as a Replica attendee, and thus there are three ways for the attendee to 'revert' to a view-only, Replica meeting attendee with behavior explained in earlier sections. (i.e. demotion will lead to audio, video, and data messages ceasing to be forwarded from the client). All demotions will result in a call to [`didDemoteFromPrimaryMeeting:status`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/PrimaryMeetingPromotionObserver.html#/c:@M@AmazonChimeSDK@objc(pl)PrimaryMeetingPromotionObserver(im)didDemoteFromPrimaryMeetingWithStatus:) with a corresponding status code.

* The client itself can trigger the demotion via [`demoteFromPrimaryMeeting`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/AudioVideoControllerFacade.html#/c:@M@AmazonChimeSDK@objc(pl)AudioVideoControllerFacade(im)demoteFromPrimaryMeeting).
* The demotion can be forced by call to [`chime::DeleteAttendee`](https://docs.aws.amazon.com/chime/latest/APIReference/API_DeleteAttendee.html) on the Chime API.
* Any disconnection will trigger an automatic demotion to avoid unexpected or unwanted promotion state on reconnection. If the attendee still needs to be an interactive participant in the Primary meeting, [`promoteToPrimaryMeeting`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/AudioVideoControllerFacade.html#/c:@M@AmazonChimeSDK@objc(pl)AudioVideoControllerFacade(im)promoteToPrimaryMeetingWithCredentials:) should be called again with the same credentials.
* Any disconnection will trigger an automatic demotion to avoid unexpected or unwanted promotion state on reconnection. If the attendee still needs to be an interactive participant in the Primary meeting, [`promoteToPrimaryMeeting`](https://aws.github.io/amazon-chime-sdk-ios/Protocols/AudioVideoControllerFacade.html#/c:@M@AmazonChimeSDK@objc(pl)AudioVideoControllerFacade(im)promoteToPrimaryMeetingWithCredentials:observer:) should be called again with the same credentials.

0 comments on commit 6b1ef98

Please sign in to comment.