createAttendee method
Creates a new attendee for an active Amazon Chime SDK meeting. For more information about the Amazon Chime SDK, see Using the Amazon Chime SDK in the Amazon Chime Developer Guide.
May throw BadRequestException.
May throw ForbiddenException.
May throw LimitExceededException.
May throw NotFoundException.
May throw ServiceFailureException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
May throw UnauthorizedException.
May throw UnprocessableEntityException.
Parameter externalUserId :
The Amazon Chime SDK external user ID. An idempotency token. Links the
attendee to an identity managed by a builder application.
Pattern: [-_&@+=,(){}\\/«».:|'"#a-zA-Z0-9À-ÿ\s]*
Values that begin with aws: are reserved. You can't configure
a value that uses this prefix.
Parameter meetingId :
The unique ID of the meeting.
Parameter capabilities :
The capabilities (audio, video, or
content) that you want to grant an attendee. If you don't
specify capabilities, all users have send and receive capabilities on all
media channels by default.
When using capabilities, be aware of these corner cases:
-
If you specify
MeetingFeatures:Video:MaxResolution:Nonewhen you create a meeting, all API requests that includeSendReceive,Send, orReceiveforAttendeeCapabilities:Videowill be rejected withValidationError 400. -
If you specify
MeetingFeatures:Content:MaxResolution:Nonewhen you create a meeting, all API requests that includeSendReceive,Send, orReceiveforAttendeeCapabilities:Contentwill be rejected withValidationError 400. -
You can't set
contentcapabilities toSendReceiveorReceiveunless you also setvideocapabilities toSendReceiveorReceive. If you don't set thevideocapability to receive, the response will contain an HTTP 400 Bad Request status code. However, you can set yourvideocapability to receive and you set yourcontentcapability to not receive. -
If meeting features is defined as
Video:MaxResolution:NonebutContent:MaxResolutionis defined as something other thanNoneand attendee capabilities are not defined in the API request, then the default attendee video capability is set toReceiveand attendee content capability is set toSendReceive. This is because contentSendReceiverequires video to be at leastReceive. -
When you change an
audiocapability fromNoneorReceivetoSendorSendReceive, and if the attendee left their microphone unmuted, audio will flow from the attendee to the other meeting participants. -
When you change a
videoorcontentcapability fromNoneorReceivetoSendorSendReceive, and if the attendee turned on their video or content streams, remote attendees can receive those streams, but only after media renegotiation between the client and the Amazon Chime back-end server.
Implementation
Future<CreateAttendeeResponse> createAttendee({
required String externalUserId,
required String meetingId,
AttendeeCapabilities? capabilities,
}) async {
final $payload = <String, dynamic>{
'ExternalUserId': externalUserId,
if (capabilities != null) 'Capabilities': capabilities,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/meetings/${Uri.encodeComponent(meetingId)}/attendees',
exceptionFnMap: _exceptionFns,
);
return CreateAttendeeResponse.fromJson(response);
}