ios_enumerateAudioPlaybackDevices method
@platform ios
@detail api
@author dixing
@brief 获取当前系统内音频播放设备列表。
@return 所有音频播放设备的列表,参看 ByteRTCDeviceCollection{@link #ByteRTCDeviceCollection}。
等待超时后会返回空列表。超时时间默认为 10 s。建议通过 rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error} 监听到 ByteRTCMediaDeviceListUpdated 后,再次调用本接口获取。
@note 你可以在收到 rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onAudioDeviceStateChanged:device_type:device_state:device_error} 了解设备变更后,重新调用本接口以获得新的设备列表。
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}');
}
}