提交 f544ebb0 编写于 作者: Z zengyawen

update docs

Signed-off-by: Nzengyawen <zengyawen1@huawei.com>
上级 d0091fb6
......@@ -154,16 +154,16 @@ this.photoOutPut.on('quickThumbnail', (err, pixelmap) => {
- **相机应用**
```js
import camera from '@ohos.multimedia.camera'
```js
import camera from '@ohos.multimedia.camera'
this.cameraManager = camera.getCameraManager(globalThis.abilityContext);
let cameras = this.cameraManager.getSupportedCameras()
if(this.cameraManager.isPreLaunchSupported(cameras[0])) {
this.cameraManager = camera.getCameraManager(globalThis.abilityContext);
let cameras = this.cameraManager.getSupportedCameras()
if(this.cameraManager.isPreLaunchSupported(cameras[0])) {
try {
this.cameraManager.setPreLaunchConfig({cameraDevice: cameras[0]});
} catch (error) {
console.error(`catch error: Code: ${error.code}, message: ${error.message}`)
}
}
```
}
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册