ios_enumerateAudioPlaybackDevices method

Future<ByteRTCDeviceCollection?> ios_enumerateAudioPlaybackDevices()

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

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

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