diff --git a/README.en.md b/README.en.md index b4b0420714efda5212464440d34b1bd53ba85567..fe3d863a426d9f197dd471a0d2fba961123793fe 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 ``` @@ -22,9 +21,10 @@ You can touch the round button at the bottom of the screen to take a photo, adju │ ├──pages │ │ ├──Index.ets // Home page │ │ └──MovingPhotoPage.ets // Moving photo preview page -│ ├──utils -│ │ ├──CameraShooter.ets // Photographing -│ │ └──VideoRecorder.ets // Video recording +│ └──utils +│ ├──CameraShooter.ets // Photographing +│ ├──GravityUtil.ets // Gravity tools +│ └──VideoRecorder.ets // Video recording └──entry/src/main/resource // Static resources ``` @@ -32,18 +32,23 @@ 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 1. The sample app is supported only on Huawei phones running the standard system. -2. The HarmonyOS version must be HarmonyOS NEXT Developer Beta1 or later. +2. The HarmonyOS version must be HarmonyOS 5.0.0 Release or later. -3. The DevEco Studio version must be DevEco Studio NEXT Developer Beta1 or later. +3. The DevEco Studio version must be DevEco Studio 5.0.0 Release or later. -4. The HarmonyOS SDK version must be HarmonyOS NEXT Developer Beta1 or later. +4. The HarmonyOS SDK version must be HarmonyOS 5.0.0 Release SDK or later. diff --git a/README.md b/README.md index 0667acd59d7914717770809c592bad758f7b57c9..4af074af3deb4a3dd3c67bab3cd5bb0d32c162cf 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ## 使用说明 -应用可以点击底部圆形按钮拍摄照片,同时可以调节变焦、闪光灯等参数,拍摄完成后可以预览照片。 +应用可以点击底部圆形按钮拍摄照片,同时可以实现旋转相机角度、切换前后摄像头等操作和调节变焦、闪光灯等参数,拍摄完成后可以预览照片。 ## 工程目录 @@ -20,11 +20,11 @@ │ ├──entryability │ │ └──EntryAbility.ets │ ├──pages -│ │ ├──Index.ets // 主页 -│ │ └──MovingPhotoPage.ets //动态图片预览页 -│ ├──utils -│ │ ├──CameraShooter.ets // 拍照 -│ │ └──VideoRecorder.ets // 录像 +│ │ └──Index.ets // 主页 +│ └──utils +│ ├──CameraShooter.ets // 拍照 +│ ├──GravityUtil.ets // 重力工具类 +│ └──VideoRecorder.ets // 录像 └──entry/src/main/resource // 应用静态资源目录 ``` @@ -34,16 +34,21 @@ ## 相关权限 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:用于三方相机获取媒体信息场景。 ## 约束与限制 1. 本示例仅支持标准系统上运行,支持设备:华为手机。 -2. HarmonyOS系统:HarmonyOS NEXT Developer Beta5及以上。 +2. HarmonyOS系统:HarmonyOS 5.0.0 Release及以上。 -3. DevEco Studio版本:DevEco Studio NEXT Developer Beta5及以上。 +3. DevEco Studio版本:DevEco Studio 5.0.0 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS NEXT Developer Beta5 SDK及以上。 +4. HarmonyOS SDK版本:HarmonyOS 5.0.0 Release SDK及以上。 diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index f350f508ef803ca4808271c3ff8feca56dd1ef0e..c4a3179f3321998b8ee216a6fb3180ea4fa9eb2a 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -45,10 +45,6 @@ import display from '@ohos.display'; import { curves } from '@kit.ArkUI'; import { sensor } from '@kit.SensorServiceKit'; -let previewSize: camera.Size = { - width: CameraConstants.PREVIEW_WIDTH, - height: CameraConstants.PREVIEW_HEIGHT -}; let cameraPosition = 0; let surfaceId = ''; let zoomRatioRange: number[] = []; @@ -119,11 +115,7 @@ struct XComponentPage { } foldAbleStatus = foldStatus; this.foldAbleStatus = foldStatus; - if (foldStatus === 1) { - cameraPosition = cameraPosition === 0 ? 0 : 2; - } else { - cameraPosition = cameraPosition === 0 ? 0 : 1; - } + cameraPosition = cameraPosition === 0 ? 0 : 1; setTimeout(() => { this.mXComponentController.setXComponentSurfaceRect({ surfaceWidth: this.foldAbleStatus === FoldStatus.FOLD_STATUS_EXPANDED ? 1400 : @@ -162,6 +154,8 @@ struct XComponentPage { .height(CameraConstants.IMAGE_SIZE) .margin(CameraConstants.MARGIN) .visibility(this.isPhoto || this.isFront ? Visibility.Hidden : Visibility.Visible) + .rotate({ angle: this.rotation }) + .animation({ curve: curves.springMotion() }) .onClick(() => { this.isStabilization = !this.isStabilization; videoRecording(this.isStabilization, cameraPosition, qualityLevel, surfaceId, context, foldAbleStatus); @@ -171,6 +165,8 @@ struct XComponentPage { .height(CameraConstants.IMAGE_SIZE) .margin(CameraConstants.MARGIN) .visibility(this.isPhoto && !this.isFront ? Visibility.Visible : Visibility.Hidden) + .rotate({ angle: this.rotation }) + .animation({ curve: curves.springMotion() }) .onClick(() => { this.isMovingPhoto = !this.isMovingPhoto; enableLivePic(this.isMovingPhoto); @@ -179,6 +175,8 @@ struct XComponentPage { .height(CameraConstants.IMAGE_HEIGHT) .margin(CameraConstants.MARGIN) .visibility(this.isFront ? Visibility.Hidden : Visibility.Visible) + .rotate({ angle: this.rotation }) + .animation({ curve: curves.springMotion() }) .bindMenu(this.isPhoto ? [ { value: 'off', @@ -230,6 +228,8 @@ struct XComponentPage { .height(CameraConstants.IMAGE_SIZE) .margin(CameraConstants.MARGIN) .visibility(this.isPhoto ? Visibility.Hidden : this.isFront ? Visibility.Hidden : Visibility.Visible) + .rotate({ angle: this.rotation }) + .animation({ curve: curves.springMotion() }) .bindMenu( [ { @@ -295,6 +295,8 @@ struct XComponentPage { Row() { Image(0 < this.zoom && this.zoom < 1 ? $r('app.media.W_0') : $r('app.media.W')) .height(CameraConstants.ZOOM_SIZE) + .rotate({ angle: this.rotation }) + .animation({ curve: curves.springMotion() }) .onClick(() => { this.zoom = zoomRatioRange[0]; this.setZoom(); @@ -306,6 +308,8 @@ struct XComponentPage { Image(1 <= this.zoom && this.zoom < 5 ? $r('app.media.1x_0') : $r('app.media.1x')) .margin({ left: CameraConstants.MARGIN_LEFT }) .height(CameraConstants.ZOOM_SIZE) + .rotate({ angle: this.rotation }) + .animation({ curve: curves.springMotion() }) .onClick(() => { this.zoom = 1; this.setZoom(); @@ -317,6 +321,8 @@ struct XComponentPage { Image(5 <= this.zoom && this.zoom < 10 ? $r('app.media.5x_0') : $r('app.media.5x')) .margin({ left: CameraConstants.MARGIN_LEFT }) .height(CameraConstants.ZOOM_SIZE) + .rotate({ angle: this.rotation }) + .animation({ curve: curves.springMotion() }) .onClick(() => { this.zoom = 5; this.setZoom(); @@ -328,6 +334,8 @@ struct XComponentPage { Image(this.zoom >= 10 ? $r('app.media.10x_0') : $r('app.media.10x')) .margin({ left: CameraConstants.MARGIN_LEFT }) .height(CameraConstants.ZOOM_SIZE) + .rotate({ angle: this.rotation }) + .animation({ curve: curves.springMotion() }) .onClick(() => { this.zoom = 10; this.setZoom(); @@ -345,6 +353,8 @@ struct XComponentPage { Row() { Text($r('app.string.Photo')) .fontColor(this.isPhoto ? Color.White : Color.Gray) + .rotate({ angle: this.rotation === camera.ImageRotation.ROTATION_180 ? this.rotation : 0 }) + .animation({ curve: curves.springMotion() }) .onClick(async () => { if (!this.isPhoto) { this.isPhoto = true; @@ -356,6 +366,8 @@ struct XComponentPage { }) Text($r('app.string.Video')) .fontColor(this.isPhoto ? Color.Gray : Color.White) + .rotate({ angle: this.rotation === camera.ImageRotation.ROTATION_180 ? this.rotation : 0 }) + .animation({ curve: curves.springMotion() }) .onClick(() => { if (this.isPhoto) { this.isPhoto = false; @@ -428,17 +440,10 @@ struct XComponentPage { Image($r('app.media.switch_camera')) .height(CameraConstants.CAMERA_SWITCH_SIZE) .visibility(this.recording ? Visibility.Hidden : Visibility.Visible) + .rotate({ angle: this.rotation }) + .animation({ curve: curves.springMotion() }) .onClick(async () => { - if (this.isFoldAble) { - foldAbleStatus = display.getFoldStatus(); - if (foldAbleStatus === 1) { - cameraPosition = cameraPosition === 0 ? 2 : 0; - } else { - cameraPosition = cameraPosition === 1 ? 0 : 1; - } - } else { - cameraPosition = cameraPosition === 1 ? 0 : 1 - } + cameraPosition = cameraPosition === 1 ? 0 : 1 if (this.isPhoto) { cameraShooting(isVideo, cameraPosition, surfaceId, context, foldAbleStatus); diff --git a/entry/src/main/ets/pages/MovingPhotoPage.ets b/entry/src/main/ets/pages/MovingPhotoPage.ets deleted file mode 100644 index c4a9436dedffbaa22cd1ed8d1ea53818e2c34dcb..0000000000000000000000000000000000000000 --- a/entry/src/main/ets/pages/MovingPhotoPage.ets +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { photoAccessHelper } from '@kit.MediaLibraryKit'; -import { MovingPhotoView, MovingPhotoViewController, MovingPhotoViewAttribute } from '@ohos.multimedia.movingphotoview'; -import { emitter } from '@kit.BasicServicesKit'; -import { dataSharePredicates } from '@kit.ArkData'; - -const PHOTO_SELECT_EVENT_ID: number = 80001; -let context = getContext(this); - -@Entry -@Component -struct MovingPhotoPage { - @State src: photoAccessHelper.MovingPhoto | undefined = undefined; - @State isMuted: boolean = false; - controller: MovingPhotoViewController = new MovingPhotoViewController(); - - async aboutToAppear(): Promise { - emitter.on({ - eventId: PHOTO_SELECT_EVENT_ID, - priority: emitter.EventPriority.IMMEDIATE, - }, () => { - this.src = AppStorage.get('mv_data') as photoAccessHelper.MovingPhoto; - }) - - let predicates: dataSharePredicates.DataSharePredicates = new dataSharePredicates.DataSharePredicates(); - let fetchOptions: photoAccessHelper.FetchOptions = { - fetchColumns: [], - predicates: predicates - }; - let photoHelper = photoAccessHelper.getPhotoAccessHelper(context); - let fetchResult: photoAccessHelper.FetchResult = - await photoHelper.getAssets(fetchOptions); - if (fetchResult !== undefined) { - let photoAsset: photoAccessHelper.PhotoAsset = await fetchResult.getLastObject(); - let requestOptions: photoAccessHelper.RequestOptions = { - deliveryMode: photoAccessHelper.DeliveryMode.FAST_MODE, - } - photoAccessHelper.MediaAssetManager.requestMovingPhoto(context, photoAsset, requestOptions, - new MediaDataHandlerMovingPhoto()); - } - } - - aboutToDisappear(): void { - emitter.off(PHOTO_SELECT_EVENT_ID); - } - - build() { - Column() { - Row() { - Column() { - MovingPhotoView({ - movingPhoto: this.src, - controller: this.controller - }) - .muted(this.isMuted) - .objectFit(ImageFit.Contain) - } - } - } - } -} - -class MediaDataHandlerMovingPhoto implements photoAccessHelper.MediaAssetDataHandler { - async onDataPrepared(movingPhoto: photoAccessHelper.MovingPhoto): Promise { - AppStorage.setOrCreate('mv_data', movingPhoto); - emitter.emit({ - eventId: PHOTO_SELECT_EVENT_ID, - priority: emitter.EventPriority.IMMEDIATE, - }, {}); - } -} \ No newline at end of file diff --git a/entry/src/main/ets/utils/CameraShooter.ets b/entry/src/main/ets/utils/CameraShooter.ets index 4812c351c0498ed48d805aa8db59827655a7097d..f6d3a4abf970dee59b11323f05b8bbec9a09df2b 100644 --- a/entry/src/main/ets/utils/CameraShooter.ets +++ b/entry/src/main/ets/utils/CameraShooter.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,6 +20,7 @@ import { photoAccessHelper } from '@kit.MediaLibraryKit'; import { common } from '@kit.AbilityKit'; import { display } from '@kit.ArkUI'; import { colorSpaceManager } from '@kit.ArkGraphics2D'; +import { getGravity } from './GravityUtil'; let previewOutput: camera.PreviewOutput; let cameraInput: camera.CameraInput; @@ -77,7 +78,7 @@ export async function cameraShooting(isVideo: boolean, cameraPosition: number, s if (previewProfile) { return profile.size.width <= 4096 && profile.size.width >= 2448 && profile.size.height === (foldAbleStatus === display.FoldStatus.FOLD_STATUS_EXPANDED ? 1 : - (previewProfile.size.height / previewProfile.size.width)) * profile.size.width; + (previewProfile.size.height / previewProfile.size.width)) * profile.size.width; } return undefined; }); @@ -138,10 +139,11 @@ export function setPhotoSmoothZoom(zoom: number): void { photoSession.setSmoothZoom(zoom); } -export function capture(isFront: boolean): void { +export async function capture(isFront: boolean) { + const curRotation = await getGravity() let settings: camera.PhotoCaptureSetting = { quality: camera.QualityLevel.QUALITY_LEVEL_HIGH, - rotation: camera.ImageRotation.ROTATION_0, + rotation: curRotation ? getPhotoRotation(photoOutPut, curRotation) : camera.ImageRotation.ROTATION_0, mirror: isFront }; photoOutPut.capture(settings); @@ -184,7 +186,10 @@ function setPhotoOutputCb(photoOutput: camera.PhotoOutput): void { AppStorage.setOrCreate('photoUri', await photoAsset.getThumbnail()); }); } - +/** + * Jump to the system application gallery + * @param context + */ export function previewPhoto(context: Context): void { let photoContext = context as common.UIAbilityContext; photoContext.startAbility({ @@ -193,4 +198,20 @@ export function previewPhoto(context: Context): void { bundleName: 'com.huawei.hmos.photos', abilityName: 'com.huawei.hmos.photos.MainAbility' }) +} +/** + * Get cur photo camera.ImageRotation + * @param photoOutput + * @param deviceDegree + * @returns + */ +function getPhotoRotation(photoOutput: camera.PhotoOutput, deviceDegree: number): camera.ImageRotation { + let photoRotation: camera.ImageRotation = camera.ImageRotation.ROTATION_0; + try { + photoRotation = photoOutput.getPhotoRotation(deviceDegree); + } catch (error) { + let err = error as BusinessError; + console.error(`The photoOutput.getPhotoRotation call failed. error code: ${err.code}`); + } + return photoRotation; } \ No newline at end of file diff --git a/entry/src/main/ets/utils/GravityUtil.ets b/entry/src/main/ets/utils/GravityUtil.ets new file mode 100644 index 0000000000000000000000000000000000000000..75b3809b46467cbd8d237a6b7260870c710e196b --- /dev/null +++ b/entry/src/main/ets/utils/GravityUtil.ets @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Decimal } from '@kit.ArkTS'; +import { sensor } from '@kit.SensorServiceKit'; + +/** + * Obtain device degree by sensor data + * @param data + * @returns + */ +function getRealData(data: sensor.GravityResponse): number { + let getDeviceDegree: number = 0; + console.info('Succeeded in invoking once. X-coordinate component: ' + data.x); + console.info('Succeeded in invoking once. Y-coordinate component: ' + data.y); + console.info('Succeeded in invoking once. Z-coordinate component: ' + data.z); + let x = data.x; + let y = data.y; + let z = data.z; + if ((x * x + y * y) * 3 < z * z) { + return getDeviceDegree; + } else { + let sd: Decimal = Decimal.atan2(y, -x); + let sc: Decimal = Decimal.round(Number(sd) / 3.141592653589 * 180) + getDeviceDegree = 90 - Number(sc); + getDeviceDegree = getDeviceDegree >= 0 ? getDeviceDegree % 360 : getDeviceDegree % 360 + 360; + } + return getDeviceDegree; +} + +/** + * Obtain device data from gravity sensors + * @returns + */ +export async function getGravity(): Promise { + let isSupported: boolean = false + const data = await sensor.getSensorList() + for (let i = 0; i < data.length; i++) { + if (data[i].sensorId === sensor.SensorId.GRAVITY) { + isSupported = true; + break; + } + } + if (!isSupported) { + console.error(`The getGravity call failed. error is device unsupported`); + return 0; + } else { + const promise: Promise = new Promise((resolve) => { + sensor.once(sensor.SensorId.GRAVITY, (data: sensor.GravityResponse) => { + resolve(getRealData(data)); + }); + }) + return promise; + } +} \ No newline at end of file diff --git a/entry/src/main/ets/utils/VideoRecorder.ets b/entry/src/main/ets/utils/VideoRecorder.ets index e907eef664adb89f09d5330bfe3f623611b0fef8..cb15123e2d1d3e7b49ef221fcf4a942da12306ce 100644 --- a/entry/src/main/ets/utils/VideoRecorder.ets +++ b/entry/src/main/ets/utils/VideoRecorder.ets @@ -19,6 +19,8 @@ import { photoAccessHelper } from '@kit.MediaLibraryKit'; import { fileIo } from '@kit.CoreFileKit'; import { common } from '@kit.AbilityKit'; import { display } from '@kit.ArkUI'; +import { BusinessError } from '@kit.BasicServicesKit'; +import { getGravity } from './GravityUtil'; let file: fileIo.File; let previewOutput: camera.PreviewOutput; @@ -62,7 +64,7 @@ export async function videoRecording(isStabilization: boolean, cameraPosition: n } let previewProfile: undefined | camera.Profile = previewProfilesArray.find((profile: camera.Profile) => { let screen = display.getDefaultDisplaySync(); - if (screen.width <= 1440 ) { + if (screen.width <= 1440) { return profile.size.height === 1080 && profile.size.width === 1920; } return profile.size.height <= screen.width && profile.size.height >= 1080 && @@ -192,6 +194,9 @@ export function setVideoSmoothZoom(zoom: number): void { } export async function startRecord(): Promise { + // Update the rotation angle before starting recording + const deviceDegree = await getGravity() + await avRecorder.updateRotation(getVideoRotation(videoOutput,deviceDegree)) await videoOutput.start(); await avRecorder.start(); } @@ -216,3 +221,21 @@ export function previewVideo(context: Context, videoUri: string): void { abilityName: 'com.huawei.hmos.photos.MainAbility' }) } + +/** + * Get cur video camera.ImageRotation + * @param photoOutput + * @param deviceDegree + * @returns + */ +function getVideoRotation(videoOutput: camera.VideoOutput, deviceDegree: number): camera.ImageRotation { + let videoRotation: camera.ImageRotation = camera.ImageRotation.ROTATION_0; + try { + videoRotation = videoOutput.getVideoRotation(deviceDegree); + console.log(`Video rotation is: ${videoRotation}`); + } catch (error) { + let err = error as BusinessError; + console.error(`The videoOutput.getVideoRotation call failed. error code: ${err.code}`); + } + return videoRotation; +} \ No newline at end of file diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index 951b366495424224bef7d6875372d0ac6f2aceb9..a32078ebf133a4d0705509076920eb8a2d7f3926 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -6,19 +6,20 @@ }, { "name": "EntryAbility_desc", - "value": "权限请求" + "value": "Permission Request" }, { "name": "EntryAbility_label", - "value": "三方相机" + "value": "Camera" }, { "name": "Photo", - "value": "拍照" + "value": "Photo" }, + { "name": "Video", - "value": "录像" + "value": "Video" }, { "name": "reason_camera", diff --git a/entry/src/main/resources/base/profile/main_pages.json b/entry/src/main/resources/base/profile/main_pages.json index 93f40d0a8f7a95333fc3927294bde186eb41ae8e..55c3f007f87b7ce5206d325f968cc56f2f79441f 100644 --- a/entry/src/main/resources/base/profile/main_pages.json +++ b/entry/src/main/resources/base/profile/main_pages.json @@ -1,6 +1,5 @@ { "src": [ - "pages/Index", - "pages/MovingPhotoPage" + "pages/Index" ] } \ No newline at end of file diff --git a/screenshots/capture.en.png b/screenshots/capture.en.png index d2ffed456f5613f28b24ae8a382abaf93284d519..9aefcee1b0dc9b6affeb067a85c3323c8bd1e777 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..3c8c86d6946169b2b33079f8c0766bd6a03919ee 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..1e7c5d0c1996d23b951ab058a4c17381434ddbaf 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..64d40ce8db95beca885143a315f10d82ba1ace0b 100644 Binary files a/screenshots/record.png and b/screenshots/record.png differ