Remove a few TODOs

This commit is contained in:
mrousavy
2021-03-17 19:29:03 +01:00
parent dff8fc7178
commit 89a35812f7
7 changed files with 16 additions and 35 deletions

View File

@@ -22,12 +22,6 @@ suspend fun CameraView.takePhoto(options: ReadableMap): WritableMap = coroutineS
Log.d(CameraView.REACT_CLASS, "takePhoto() called")
val imageCapture = imageCapture ?: throw CameraNotReadyError()
if (options.hasKey("photoCodec")) {
// TODO photoCodec
}
if (options.hasKey("qualityPrioritization")) {
// TODO qualityPrioritization
}
if (options.hasKey("flash")) {
val flashMode = options.getString("flash")
imageCapture.flashMode = when (flashMode) {
@@ -37,6 +31,13 @@ suspend fun CameraView.takePhoto(options: ReadableMap): WritableMap = coroutineS
else -> throw InvalidTypeScriptUnionError("flash", flashMode ?: "(null)")
}
}
// All those options are not yet implemented - see https://github.com/cuvent/react-native-vision-camera/issues/75
if (options.hasKey("photoCodec")) {
// TODO photoCodec
}
if (options.hasKey("qualityPrioritization")) {
// TODO qualityPrioritization
}
if (options.hasKey("enableAutoRedEyeReduction")) {
// TODO enableAutoRedEyeReduction
}
@@ -56,7 +57,7 @@ suspend fun CameraView.takePhoto(options: ReadableMap): WritableMap = coroutineS
val camera2Info = Camera2CameraInfo.from(camera!!.cameraInfo)
val lensFacing = camera2Info.getCameraCharacteristic(CameraCharacteristics.LENS_FACING)
// TODO: Flip image if lens is front side
// TODO: Flip image if lens is front side - see https://github.com/cuvent/react-native-vision-camera/issues/74
val results = awaitAll(
async(coroutineContext) {