setAudioOutputDevice method
Sets the audio output device for the call.
device: The audio output device to set. Returns a Result indicating the success or failure of the operation.
On web platforms, this method may return an error if the browser does not support setting audio output devices programmatically.
Implementation
Future<Result<None>> setAudioOutputDevice(RtcMediaDevice device) async {
final result =
await _session?.setAudioOutputDevice(device) ??
Result.error('Session is null');
if (result.isSuccess) {
_connectOptions = connectOptions.copyWith(audioOutputDevice: device);
_stateManager.participantSetAudioOutputDevice(device: device);
_stateManager.audioOutputSelectedByUser = true;
}
return result;
}