diff --git a/zh-cn/application-dev/media/camera-device-input.md b/zh-cn/application-dev/media/camera-device-input.md index e0238db57aadb4ba9c35492c28c8a47c754650ab..5c96e3d9d7afc48a2d11e5d24aa0e73d68682d14 100644 --- a/zh-cn/application-dev/media/camera-device-input.md +++ b/zh-cn/application-dev/media/camera-device-input.md @@ -10,8 +10,8 @@ ```ts import camera from '@ohos.multimedia.camera'; - import type { BusinessError } from '@ohos.base'; - import type featureAbility from '@ohos.ability.featureAbility'; + import { BusinessError } from '@ohos.base'; + import featureAbility from '@ohos.ability.featureAbility'; ``` 2. 通过getCameraManager()方法,获取cameraManager对象。 diff --git a/zh-cn/application-dev/media/camera-metadata.md b/zh-cn/application-dev/media/camera-metadata.md index 290c0ea90a38323593ee1ceef6bc9c89c2fc08f7..dd24fa00fc3f27c02c83c45a6bb0967a95c39f4e 100644 --- a/zh-cn/application-dev/media/camera-metadata.md +++ b/zh-cn/application-dev/media/camera-metadata.md @@ -11,7 +11,7 @@ Metadata主要是通过一个TAG(Key),去找对应的Data,用于传递 1. 导入相关接口,导入方法如下。 ```ts import camera from '@ohos.multimedia.camera'; - import type { BusinessError } from '@ohos.base'; + import { BusinessError } from '@ohos.base'; ``` 2. 调用CameraOutputCapability类中的supportedMetadataObjectTypes()方法,获取当前设备支持的元数据类型,并通过createMetadataOutput()方法创建元数据输出流。 diff --git a/zh-cn/application-dev/media/camera-mode.md b/zh-cn/application-dev/media/camera-mode.md index 3bc2c80f3bcb29d1907719d806a006b8dfc96c0e..200a3c830d15c9e72c7d3f11782e86596395d519 100644 --- a/zh-cn/application-dev/media/camera-mode.md +++ b/zh-cn/application-dev/media/camera-mode.md @@ -12,9 +12,9 @@ [各类Context的获取方式](../application-models/application-context-stage.md) ```ts import camera from '@ohos.multimedia.camera'; -import type { BusinessError } from '@ohos.base'; +import { BusinessError } from '@ohos.base'; import image from '@ohos.multimedia.image'; -import type featureAbility from '@ohos.ability.featureAbility'; +import featureAbility from '@ohos.ability.featureAbility'; async function cameraModeCase(context: featureAbility.Context, surfaceId: string): Promise { // 创建CameraManager对象 diff --git a/zh-cn/application-dev/media/camera-performance-improvement.md b/zh-cn/application-dev/media/camera-performance-improvement.md index bd1aceb3859f5cd612268a8e203df51d6977e0e8..2cd4d412cb255e1a4895064cc4014d9ebb120b95 100644 --- a/zh-cn/application-dev/media/camera-performance-improvement.md +++ b/zh-cn/application-dev/media/camera-performance-improvement.md @@ -35,7 +35,7 @@ ```js import camera from '@ohos.multimedia.camera'; -import type featureAbility from '@ohos.ability.featureAbility'; +import featureAbility from '@ohos.ability.featureAbility'; async function preview(context: featureAbility.Context, cameraInfo: camera.CameraDevice, previewProfile: camera.Profile, photoProfile: camera.Profile, surfaceId: string): Promise { const cameraManager: camera.CameraManager = camera.getCameraManager(context); @@ -85,9 +85,9 @@ async function preview(context: featureAbility.Context, cameraInfo: camera.Camer [各类Context的获取方式](../application-models/application-context-stage.md) ```js import camera from '@ohos.multimedia.camera'; -import type { BusinessError } from '@ohos.base'; +import { BusinessError } from '@ohos.base'; import image from '@ohos.multimedia.image'; -import type featureAbility from '@ohos.ability.featureAbility'; +import featureAbility from '@ohos.ability.featureAbility'; async function enableQuickThumbnail(context: featureAbility.Context, surfaceId: string, photoProfile: camera.Profile): Promise { let cameraManager: camera.CameraManager = camera.getCameraManager(context); @@ -154,8 +154,8 @@ function showOrSavePicture(pixelMap: image.PixelMap): void { ```js import camera from '@ohos.multimedia.camera'; - import type { BusinessError } from '@ohos.base'; - import type featureAbility from '@ohos.ability.featureAbility'; + import { BusinessError } from '@ohos.base'; + import featureAbility from '@ohos.ability.featureAbility'; function preLaunch(context: featureAbility.Context): void { let cameraManager: camera.CameraManager = camera.getCameraManager(context); @@ -176,8 +176,8 @@ function showOrSavePicture(pixelMap: image.PixelMap): void { ```js import camera from '@ohos.multimedia.camera'; - import type { BusinessError } from '@ohos.base'; - import type featureAbility from '@ohos.ability.featureAbility'; + import { BusinessError } from '@ohos.base'; + import featureAbility from '@ohos.ability.featureAbility'; function setPreLaunchConfig(context: featureAbility.Context): void { let cameraManager: camera.CameraManager = camera.getCameraManager(context); diff --git a/zh-cn/application-dev/media/camera-preview.md b/zh-cn/application-dev/media/camera-preview.md index 838f4dee9b8cac74643d3dc6a44aa10fa95cf0ab..d7baa26440435cb0c78f510fa9ea271aaa463dc6 100644 --- a/zh-cn/application-dev/media/camera-preview.md +++ b/zh-cn/application-dev/media/camera-preview.md @@ -10,7 +10,7 @@ ```ts import camera from '@ohos.multimedia.camera'; - import type { BusinessError } from '@ohos.base'; + import { BusinessError } from '@ohos.base'; ``` 2. 创建Surface。 diff --git a/zh-cn/application-dev/media/camera-recording-case.md b/zh-cn/application-dev/media/camera-recording-case.md index d957680100e33cd58c4a97262d7487d04613d0a3..f5fb83ef90e4b33e92bb42d34aa1d04d8f457808 100644 --- a/zh-cn/application-dev/media/camera-recording-case.md +++ b/zh-cn/application-dev/media/camera-recording-case.md @@ -11,9 +11,9 @@ [各类Context的获取方式](../application-models/application-context-stage.md) ```ts import camera from '@ohos.multimedia.camera'; -import type { BusinessError } from '@ohos.base'; +import { BusinessError } from '@ohos.base'; import media from '@ohos.multimedia.media'; -import type featureAbility from '@ohos.ability.featureAbility'; +import featureAbility from '@ohos.ability.featureAbility'; async function videoRecording(context: featureAbility.Context, surfaceId: string): Promise { // 创建CameraManager对象 diff --git a/zh-cn/application-dev/media/camera-recording.md b/zh-cn/application-dev/media/camera-recording.md index 8e8a8433ff113f0d2f2a71bdcb47b07640fb2635..99589ec47ede53d88579af8a87121dd1c26b7343 100644 --- a/zh-cn/application-dev/media/camera-recording.md +++ b/zh-cn/application-dev/media/camera-recording.md @@ -9,7 +9,7 @@ 1. 导入media模块。创建拍照输出流的SurfaceId以及拍照输出的数据,都需要用到系统提供的[media接口](../reference/apis/js-apis-media.md)能力,导入media接口的方法如下。 ```ts - import type { BusinessError } from '@ohos.base'; + import { BusinessError } from '@ohos.base'; import media from '@ohos.multimedia.media'; ``` diff --git a/zh-cn/application-dev/media/camera-session-management.md b/zh-cn/application-dev/media/camera-session-management.md index 1ea15016fbaa0784e6bcefdc1a2c41b084bf2404..26b7b684a2f2a2d237e353c24be95506ac586c38 100644 --- a/zh-cn/application-dev/media/camera-session-management.md +++ b/zh-cn/application-dev/media/camera-session-management.md @@ -18,8 +18,8 @@ ```ts import camera from '@ohos.multimedia.camera'; - import type { BusinessError } from '@ohos.base'; - import type featureAbility from '@ohos.ability.featureAbility'; + import { BusinessError } from '@ohos.base'; + import featureAbility from '@ohos.ability.featureAbility'; ``` 2. 调用cameraManager类中的createCaptureSession()方法创建一个会话。 diff --git a/zh-cn/application-dev/media/camera-shooting.md b/zh-cn/application-dev/media/camera-shooting.md index 0466deeb96c02a15b872d88702aa7a6dc08f21a3..03c6952a5642462fc33ff5042c36a36a32bfc91e 100644 --- a/zh-cn/application-dev/media/camera-shooting.md +++ b/zh-cn/application-dev/media/camera-shooting.md @@ -11,7 +11,7 @@ ```ts import image from '@ohos.multimedia.image'; import camera from '@ohos.multimedia.camera'; - import type { BusinessError } from '@ohos.base'; + import { BusinessError } from '@ohos.base'; ``` 2. 获取SurfaceId。