Lines Matching refs:camera

3 Before developing a camera application, you must call the camera APIs to create an independent came…
7 Read [Camera](../../reference/apis-camera-kit/js-apis-camera.md) for the API reference.
9 1. Import the camera module, which provides camera-related attributes and methods.
12 import { camera } from '@kit.CameraKit';
17 2. Call [getCameraManager](../../reference/apis-camera-kit/js-apis-camera.md#cameragetcameramanager…
22 function getCameraManager(context: common.BaseContext): camera.CameraManager {
23 let cameraManager: camera.CameraManager = camera.getCameraManager(context);
30 …> If obtaining the object fails, the camera device may be occupied or unusable. If it is occupied,…
32camera-kit/js-apis-camera.md#getsupportedcameras) in the [cameraManager](../../reference/apis-came…
35 function getCameraDevices(cameraManager: camera.CameraManager): Array<camera.CameraDevice> {
36 let cameraArray: Array<camera.CameraDevice> = cameraManager.getSupportedCameras();
39 console.info('cameraId : ' + cameraArray[index].cameraId); // Obtain the camera ID.
40 …sole.info('cameraPosition : ' + cameraArray[index].cameraPosition); // Obtain the camera position.
41 console.info('cameraType : ' + cameraArray[index].cameraType); // Obtain the camera type.
42 …fo('connectionType : ' + cameraArray[index].connectionType); // Obtain the camera connection type.
55camera application development, you can listen for the camera status, including the appearance of …
57 …bout the parameter, see [CameraStatusInfo](../../reference/apis-camera-kit/js-apis-camera.md#camer…
60 function onCameraStatusChange(cameraManager: camera.CameraManager): void {
61 …cameraManager.on('cameraStatus', (err: BusinessError, cameraStatusInfo: camera.CameraStatusInfo) =…
66 …// If a camera is connected through a USB cable, the callback function returns the CAMERA_STATUS_A…
67 if (cameraStatusInfo.status == camera.CameraStatus.CAMERA_STATUS_APPEAR) {
70 …// If the USB connection of the camera is interrupted, the callback function returns the CAMERA_ST…
71 if (cameraStatusInfo.status == camera.CameraStatus.CAMERA_STATUS_DISAPPEAR) {
74 // If the camera is closed, the callback function returns the CAMERA_STATUS_AVAILABLE status.
75 if (cameraStatusInfo.status == camera.CameraStatus.CAMERA_STATUS_AVAILABLE) {
78 …// If the camera is opened or occupied, the callback function returns the CAMERA_STATUS_UNAVAILABL…
79 if (cameraStatusInfo.status == camera.CameraStatus.CAMERA_STATUS_UNAVAILABLE) {
82 console.info(`camera: ${cameraStatusInfo.camera.cameraId}`);