提交 f4e2c282 编写于 作者: S songchunpeng

modefy the camera.md

Signed-off-by: Nsongchunpeng <songchunpeng@huawei.com>
上级 664813db
...@@ -81,6 +81,9 @@ for (let index = 0; index < cameraArray.length; index++) { ...@@ -81,6 +81,9 @@ for (let index = 0; index < cameraArray.length; index++) {
// Create a camera input stream. // Create a camera input stream.
let cameraInput = await cameraManager.createCameraInput(cameraArray[0]) let cameraInput = await cameraManager.createCameraInput(cameraArray[0])
// Open camera
await cameraInput.open();
// Obtain the output stream capabilities supported by the camera. // Obtain the output stream capabilities supported by the camera.
let cameraOutputCap = await cameraManager.getSupportedOutputCapability(cameraArray[0]); let cameraOutputCap = await cameraManager.getSupportedOutputCapability(cameraArray[0]);
if (!cameraOutputCap) { if (!cameraOutputCap) {
......
...@@ -81,6 +81,9 @@ for (let index = 0; index < cameraArray.length; index++) { ...@@ -81,6 +81,9 @@ for (let index = 0; index < cameraArray.length; index++) {
// 创建相机输入流 // 创建相机输入流
let cameraInput = await cameraManager.createCameraInput(cameraArray[0]) let cameraInput = await cameraManager.createCameraInput(cameraArray[0])
// 打开相机
await cameraInput.open();
// 获取相机设备支持的输出流能力 // 获取相机设备支持的输出流能力
let cameraOutputCap = await cameraManager.getSupportedOutputCapability(cameraArray[0]); let cameraOutputCap = await cameraManager.getSupportedOutputCapability(cameraArray[0]);
if (!cameraOutputCap) { if (!cameraOutputCap) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册