enableMic method

Future<void> enableMic()

Enables the participant’s microphone.

  • Calling this method sends a microphone enable request to the participant. The participant will first receive a Events.micRequested event. Once the request is accepted, the microphone is enabled.

  • After the microphone is enabled, all participants in the room will receive a Events.streamEnabled event with the corresponding audio RTCStream object.

Returns

  • A Future<void> that completes once the native SDK accepts the request, or throws a VideoSDKError carrying its code and name.

Example

// Request the participant to enable their microphone
await participant.enableMic();

Implementation

Future<void> enableMic() => _enablePeerMic(id);