enumerateAudioPlaybackDevices method
@detail api
@author dixing
@brief Gets the list of the audio playback devices.
@return The list of all audio playback devices. See ByteRTCDeviceCollection{@link #ByteRTCDeviceCollection}.
If a time-out occurs, it returns an empty list. By default, the time-out duration is set to 10 seconds. We recommend to call this API once you get notification of ByteRTCMediaDeviceListUpdated via rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error}.
@note When receiving rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error} for audio playback device change, you can call this API to get the latest list of audio playback devices.
Implementation
FutureOr<ByteRTCDeviceCollection> enumerateAudioPlaybackDevices() async {
final result = await nativeCall('enumerateAudioPlaybackDevices', []);
return packObject(
result,
() => ByteRTCDeviceCollection(
const NativeClassOptions([], disableInit: true)));
}