fix(nodes): default camera snap to front high-quality image

This commit is contained in:
Ayaan Zaidi
2026-02-26 11:35:05 +05:30
committed by Ayaan Zaidi
parent bee0c564cf
commit 8117a13dd6
3 changed files with 40 additions and 5 deletions

View File

@@ -81,8 +81,8 @@ class CameraCaptureManager(private val context: Context) {
ensureCameraPermission()
val owner = lifecycleOwner ?: throw IllegalStateException("UNAVAILABLE: camera not ready")
val facing = parseFacing(paramsJson) ?: "front"
val quality = (parseQuality(paramsJson) ?: 0.5).coerceIn(0.1, 1.0)
val maxWidth = parseMaxWidth(paramsJson) ?: 800
val quality = (parseQuality(paramsJson) ?: 0.95).coerceIn(0.1, 1.0)
val maxWidth = parseMaxWidth(paramsJson) ?: 1600
val provider = context.cameraProvider()
val capture = ImageCapture.Builder().build()