enumerateAudioCaptureDevices method
@detail api
@author dixing
@brief Get the list of audio capture devices.
@return The list of audio capture 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 device change, you can call this API to get the latest list of audio playback devices.
Implementation
FutureOr<ByteRTCDeviceCollection> enumerateAudioCaptureDevices() async {
final result = await nativeCall('enumerateAudioCaptureDevices', []);
return packObject(
result,
() => ByteRTCDeviceCollection(
const NativeClassOptions([], disableInit: true)));
}