ios_enumerateAudioCaptureDevices method

Future<ByteRTCDeviceCollection?> ios_enumerateAudioCaptureDevices()

@platform ios @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

Future<$p_i.ByteRTCDeviceCollection?>
    ios_enumerateAudioCaptureDevices() async {
  $() => ($instance as $p_i.ByteRTCAudioDeviceManager)
      .enumerateAudioCaptureDevices();

  if (Platform.isIOS) {
    return $();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}