Interface CameraAPI

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

Methods

  • Activates the camera flash light

    Parameters

    • state: boolean

    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

  • 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: window.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