Interface (ControlCenterQuery)
ControlCenterQuery is used to check whether the camera controller is supported.
NOTE
- The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
- The initial APIs of this interface are supported since API version 20.
Modules to Import
import { camera } from '@kit.CameraKit';
isControlCenterSupported20+
isControlCenterSupported(): boolean
Checks whether the camera controller is supported.
Atomic service API: This API can be used in atomic services since API version 20.
System capability: SystemCapability.Multimedia.Camera.Core
Return value
| Type | Description |
|---|---|
| boolean | Check result for the support of the camera controller. true if supported, false otherwise. |
Example
function isControlCenterSupported(videoSession: camera.VideoSession): boolean {
let isSupported: boolean = videoSession.isControlCenterSupported();
return isSupported;
}
getSupportedEffectTypes20+
getSupportedEffectTypes(): Array<ControlCenterEffectType>
Obtains the effect types supported by the camera controller.
Atomic service API: This API can be used in atomic services since API version 20.
System capability: SystemCapability.Multimedia.Camera.Core
Return value
| Type | Description |
|---|---|
| Array<ControlCenterEffectType> | Array of effect types supported. |
Example
function getSupportedEffectTypes(videoSession: camera.VideoSession): Array<camera.ControlCenterEffectType> {
let effectTypes: Array<camera.ControlCenterEffectType> = [];
effectTypes = videoSession.getSupportedEffectTypes();
return effectTypes;
}