anyline-js
    Preparing search index...

    Interface CameraAPI

    interface CameraAPI {
        activateFlash(state: boolean): Promise<void>;
        mirrorStream(state: boolean): void;
        reappend(): void;
        refocus(): Promise<void>;
        setCamera(deviceId: string): void;
    }
    Index

    Methods

    • Activates the camera flash light

      Parameters

      • state: boolean

      Returns Promise<void>

      A promise

      This feature works on Google Chrome for Android and Safari 18.4+

      OnlyAndroidChromeError This exception is thrown if the browser does not support this feature

    • Mirrors the stream (i.E for front-facing cameras)

      Parameters

      • state: boolean

        if the stream should be mirrored or not

      Returns void

    • Reappends the camera. This can help in case you experience a camera stream failure when resuming to the webapp after sleep / longer suspension.

      Returns void

      example: globalThis.onfocus = () => anyline.camera.reappend();

    • Refocus the camera

      Returns Promise<void>

      A promise

      This feature works currently only on Google Chrome for Android

      OnlyAndroidChromeError This exception is thrown if the browser is not capabale of this feature