kaios-types
    Preparing search index...

    Interface CameraManager

    Provides access to the device's cameras. Maps to nsDOMCameraManager.

    interface CameraManager {
        getCamera(
            camera: string,
            initialConfiguration?: CameraConfiguration,
        ): Promise<CameraGetPromiseData>;
        getListOfCameras(): string[];
    }
    Index

    Methods

    • Request a camera instance.

      Parameters

      • camera: string

        The identifier of the camera to get (e.g., returned by getListOfCameras).

      • OptionalinitialConfiguration: CameraConfiguration

        Optional configuration for the camera.

      Returns Promise<CameraGetPromiseData>

      A promise that resolves with the camera object and configuration.

      NS_ERROR_NOT_AVAILABLE if the camera is not available.

    • Returns a list of available camera identifiers.

      Returns string[]

      An array of strings identifying the available cameras.

      NS_ERROR_FAILURE if the list cannot be retrieved.