disconnectParticipant method
Disconnects a specified participant from a specified stage. If the
participant is publishing using an IngestConfiguration,
DisconnectParticipant also updates the stageArn in the
IngestConfiguration to be an empty string.
May throw AccessDeniedException.
May throw PendingVerification.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter participantId :
Identifier of the participant to be disconnected. IVS assigns this; it is
returned by CreateParticipantToken (for streams using WebRTC
ingest) or CreateIngestConfiguration (for streams using RTMP
ingest).
Parameter stageArn :
ARN of the stage to which the participant is attached.
Parameter reason :
Description of why this participant is being disconnected.
Implementation
Future<void> disconnectParticipant({
required String participantId,
required String stageArn,
String? reason,
}) async {
final $payload = <String, dynamic>{
'participantId': participantId,
'stageArn': stageArn,
if (reason != null) 'reason': reason,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/DisconnectParticipant',
exceptionFnMap: _exceptionFns,
);
}