import type { CustomEvent } from "../../constructors/events"; declare const modes: readonly [ "normal", "scanCode" ]; declare const devicePositions: readonly [ "front", "back" ]; declare const flashes: readonly [ "auto", "on", "off", "torch" ]; /** * @value 'normal' 相机模式 * @value 'scanCode' 扫码模式 */ declare type CameraMode = typeof modes[number]; /** * @value 'front' 前置 * @value 'back' 后置 */ declare type CameraDevicePosition = typeof devicePositions[number]; /** * @value 'auto' 自动 * @value 'on' 打开 * @value 'off' 关闭 * @value 'torch' 常亮 */ declare type CameraFlash = typeof flashes[number]; /** * 系统相机功能,需要[用户授权](https://open.kuaishou.com/docs/develop/api-next/open/authorize/ks.authorize.html) scope.camera。 * * 相关 api:[ks.createCameraContext](https://open.kuaishou.com/docs/develop/api-next/media/camera/ks.createCameraContext.html) * * @version {"kma":"1.1.0","ide":"1.22.0__MOCK"} * */ export declare interface CameraProps { /** * 应用模式,只在初始化时有效,不能动态变更 * @alpha */ mode?: CameraMode; /** * 摄像头朝向 */ devicePosition?: CameraDevicePosition; /** * 闪光灯,值为 auto, on, off */ flash?: CameraFlash; /** * 摄像头在非正常终止时触发,如退出后台等情况 * @alpha */ onStop?: (event: CustomEvent>) => void; /** * 用户不允许使用摄像头时触发 * @alpha */ onError?: (event: CustomEvent>) => void; /** * 相机初始化完成时触发,e.detail = {maxZoom} * @alpha */ onInitDone?: (event: CustomEvent>) => void; /** * 在扫码识别成功时触发,仅在 mode="scanCode" 时生效 * @alpha */ onScanCode?: (event: CustomEvent>) => void; } export {};