Options
All
  • Public
  • Public/Protected
  • All
Menu

A helper object to interact with cameras.

Index

Functions

getCameras

  • getCameras(refreshDevices?: boolean, cameraAlreadyAccessed?: boolean): Promise<Camera[]>
  • Get a list of cameras (if any) available on the device, a camera access permission is requested to the user the first time this method is called if needed.

    If the browser is incompatible the returned promise is rejected with a UnsupportedBrowserError error.

    When refreshing available devices, if updated deviceId information is detected, cameras' deviceId are updated accordingly. This could happen after a camera access and stop in some situations.

    Parameters

    • refreshDevices: boolean = false

      Force a call to refresh available video devices even when information is already available.

    • cameraAlreadyAccessed: boolean = false

      Hint that a camera has already been accessed before, avoiding a possible initial camera access permission request on the first call, in cases this cannot be already reliably detected.

    Returns Promise<Camera[]>

    A promise resolving to the array of available Camera objects (could be empty).

isIOSBackDualWideCameraLabel

  • isIOSBackDualWideCameraLabel(label: string): boolean
  • Parameters

    • label: string

      The camera label.

    Returns boolean

    Whether the label identifies the camera being the iOS Back Dual camera one.

Generated using TypeDoc