diff --git a/README.en.md b/README.en.md index 512ef685411a2fd2ebe9f6c4f09241f4f3ec932f..db99370c71532e3c93c7f62a4d2bddc845b47432 100644 --- a/README.en.md +++ b/README.en.md @@ -9,8 +9,7 @@ This sample demonstrates a third-party camera app featuring system-level camera- ## How to Use -You can touch the round button at the bottom of the screen to take a photo, adjust the zoom and flash settings, and preview the photo. - +The application allows users to click on the circular button at the bottom to take photos, as well as rotate the camera angle, switch between front and rear cameras, and adjust zoom, flash, and other parameters. After taking the photo, users can preview it. ## Project Directory ``` @@ -24,6 +23,7 @@ You can touch the round button at the bottom of the screen to take a photo, adju │ │ └──MovingPhotoPage.ets // Moving photo preview page │ ├──utils │ │ ├──CameraShooter.ets // Photographing +│ │ ├──GravityUtil.ets // Gravity tools │ │ └──VideoRecorder.ets // Video recording └──entry/src/main/resource // Static resources ``` @@ -32,11 +32,16 @@ You can touch the round button at the bottom of the screen to take a photo, adju Use Camera Kit to take photos and use **photoAccessHelper** to save photos and videos. ## Required Permissions -1. Apply for the access control list permission to obtain the permission to save photos to the system app Gallery. +1. The media permission is restricted and requires applying for [ACL](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/declare-permissions-in-acl-V5), generating debugging certificates, and obtaining permission to store photos in the system gallery. -2. Camera permissions: **ohos.permission.CAMERA** and **ohos.permission.MICROPHONE** +2. Camera permissions: +**ohos.permission.CAMERA** :Used for third-party camera development scenarios; +**ohos.permission.MICROPHONE**:For third-party camera recording scenarios. -3. Media library permissions: **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** and **ohos.permission.MEDIA_LOCATION** +3. Media library permissions: +**ohos.permission.READ_IMAGEVIDEO**:For third-party camera to read media files; +**ohos.permission.WRITE_IMAGEVIDEO**:For third-party camera to save media files; +**ohos.permission.MEDIA_LOCATION**:For third-party camera to access media information scenarios. ## Constraints diff --git a/README.md b/README.md index 23ea975cd3a6d6cb397e86e9c62df2e0b0c47544..dde10df5ba354e91e7886455ff148355e0d9b995 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ## 使用说明 -应用可以点击底部圆形按钮拍摄照片,同时可以调节变焦、闪光灯等参数,拍摄完成后可以预览照片。 +应用可以点击底部圆形按钮拍摄照片,同时可以实现旋转相机角度、切换前后摄像头等操作和调节变焦、闪光灯等参数,拍摄完成后可以预览照片。 ## 工程目录 @@ -34,9 +34,14 @@ ## 相关权限 1、媒体库权限是受限权限,需要申请[ACL提权](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/declare-permissions-in-acl-V5),生成调试证书,获得权限将照片存入系统图库 -2、相机权限:ohos.permission.CAMERA、ohos.permission.MICROPHONE +2、相机权限: +ohos.permission.CAMERA:用于三方相机开发场景; +ohos.permission.MICROPHONE:用于三方相机录像场景。 -3、媒体库权限:ohos.permission.READ_IMAGEVIDEO、ohos.permission.WRITE_IMAGEVIDEO、ohos.permission.MEDIA_LOCATION +3、媒体库权限: +ohos.permission.READ_IMAGEVIDEO:用于三方相机读取媒体文件; +ohos.permission.WRITE_IMAGEVIDEO:用于三方相机保存媒体文件; +ohos.permission.MEDIA_LOCATION:用于三方相机获取媒体信息场景。 ## 约束与限制 diff --git a/screenshots/capture.en.png b/screenshots/capture.en.png index d2ffed456f5613f28b24ae8a382abaf93284d519..501e6ae863ce327f51337bf3b782cdaf0f5a05b4 100644 Binary files a/screenshots/capture.en.png and b/screenshots/capture.en.png differ diff --git a/screenshots/capture.png b/screenshots/capture.png index 9465754078111b014f8462011df5b9ce2066548c..d2e0872a0d8c221aedcef4270a041fc3c6f947c1 100644 Binary files a/screenshots/capture.png and b/screenshots/capture.png differ diff --git a/screenshots/record.en.png b/screenshots/record.en.png index a6ef771901524bcc87238007be80aac394e62d2e..ef922de8b13a4ba8425a51e65c163b1257e125b7 100644 Binary files a/screenshots/record.en.png and b/screenshots/record.en.png differ diff --git a/screenshots/record.png b/screenshots/record.png index f42866e9d9dc1b72d151ee7d0668281b8684d4f5..3a47038ed18b737b18e8500b5e2d56aa484a8421 100644 Binary files a/screenshots/record.png and b/screenshots/record.png differ