selectAudioOutput static method
Used to select a specific audio output device.
Note: This method is only used for Flutter native, supported on iOS/Android/macOS/Windows.
Android/macOS/Windows: Can be used to switch all output devices. iOS: you can only switch directly between the speaker and the preferred device web: flutter web can use RTCVideoRenderer.audioOutput instead
Implementation
static Future<void> selectAudioOutput(String deviceId) async {
await navigator.mediaDevices
.selectAudioOutput(AudioOutputOptions(deviceId: deviceId));
}