setVideoCaptureDevice method
@valid since 3.56 @detail api @author likai.666 @brief Set the current video capture device @param deviceId Video device ID, which can be obtained through enumerateVideoCaptureDevices{@link #IVideoDeviceManager#enumerateVideoCaptureDevices} @return - 0: Success. +! 0: failure
Implementation
Future<int?> setVideoCaptureDevice(string deviceId) async {
$a() =>
($instance as $p_a.IVideoDeviceManager).setVideoCaptureDevice(deviceId);
$i() => ($instance as $p_i.ByteRTCVideoDeviceManager)
.setVideoCaptureDevice(deviceId);
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}