From 6cf5a0c0807bef08b5e84dcbc79079942d5e0741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A2=A6=E9=BE=99?= Date: Thu, 11 Dec 2025 09:08:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=98=E9=87=8F=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E4=B8=8D=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CameraKit/entry/src/main/ets/pages/GetFrontCameraImage.ets | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CameraKit/entry/src/main/ets/pages/GetFrontCameraImage.ets b/CameraKit/entry/src/main/ets/pages/GetFrontCameraImage.ets index 41a98e7..41a06e9 100644 --- a/CameraKit/entry/src/main/ets/pages/GetFrontCameraImage.ets +++ b/CameraKit/entry/src/main/ets/pages/GetFrontCameraImage.ets @@ -40,11 +40,11 @@ struct GetFrontCameraImage { }); // 2、Create and start a physical camera input stream channel // Set as front camera camera.CameraPosition.CAMERA_POSITION_FRONT - let fontCamera = camerasInfo.find(cam => cam.cameraPosition === camera.CameraPosition.CAMERA_POSITION_FRONT); - let cameraInput = cameraManager.createCameraInput(fontCamera); + let frontCamera = camerasInfo.find(cam => cam.cameraPosition === camera.CameraPosition.CAMERA_POSITION_FRONT); + let cameraInput = cameraManager.createCameraInput(frontCamera); await cameraInput.open(); // 3、Retrieve the physical camera information and query the output formats supported by the preview stream of the camera. Create a preview output channel by combining it with the surfaceId provided by XComponent - let outputCapability = cameraManager.getSupportedOutputCapability(fontCamera, camera.SceneMode.NORMAL_PHOTO); + let outputCapability = cameraManager.getSupportedOutputCapability(frontCamera, camera.SceneMode.NORMAL_PHOTO); let previewProfile = outputCapability.previewProfiles[0]; let surfaceId = this.xComponentController.getXComponentSurfaceId(); let previewOutput = cameraManager.createPreviewOutput(previewProfile, surfaceId); -- Gitee