enumerateVideoCaptureDevices method
@detail api
@author zhangzhenyu.samuel
@brief Get the list of video capture devices.
@return Contains a list of all video capture devices in the system. 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:onVideoDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onVideoDeviceStateChanged:device_type:device_state:device_error}.
@note When receiving rtcEngine:onVideoDeviceStateChanged:device_type:device_state:device_error:{@link #ByteRTCEngineDelegate#rtcEngine:onVideoDeviceStateChanged: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> enumerateVideoCaptureDevices() async {
final result = await nativeCall('enumerateVideoCaptureDevices', []);
return packObject(
result,
() => ByteRTCDeviceCollection(
const NativeClassOptions([], disableInit: true)));
}