enumerateVideoCaptureDevices method

FutureOr<ByteRTCDeviceCollection> enumerateVideoCaptureDevices()

@detail api @author zhangzhenyu.samuel @brief 获取视频采集设备列表。 @return 包含系统中所有视频采集设备的列表,参看 ByteRTCDeviceCollection{@link #ByteRTCDeviceCollection}。
等待超时后会返回空列表。超时时间默认为 10 s。建议通过 rtcEngine:onVideoDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onVideoDeviceStateChanged:device_type:device_state:device_error} 监听到 ByteRTCMediaDeviceListUpdated 后,再次调用本接口获取。 @note 你可以在收到 rtcEngine:onVideoDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onVideoDeviceStateChanged:device_type:device_state:device_error} 了解设备变更后,重新调用本接口以获得新的设备列表。

Implementation

FutureOr<ByteRTCDeviceCollection> enumerateVideoCaptureDevices() async {
  final result = await nativeCall('enumerateVideoCaptureDevices', []);
  return packObject(
      result,
      () => ByteRTCDeviceCollection(
          const NativeClassOptions([], disableInit: true)));
}