Class BrowserCameras

This class has two purposes:

  1. It provides a list of the cameras that the browser offers access to.
  2. It tries to answer the difficult question of "which of these cameras is the main one".

Properties

Accessors

Methods

Properties

listOfCameras: CameraInfo[]

Call load to populate this list.

Accessors

Methods

  • You need to call load before calling this function to populate the list of cameras.

    Parameters

    • facingMode: "front" | "back"

    Returns CameraInfo

    The "main" camera of the device. Typically, this is the camera with the highest resolution. Typically, it has a "regular" lens (i.e. not fish-eye or telephoto lens).

  • This method populates the internally cached list of cameras. Results to this method are cached and subsequent calls will faster. See DiscoverCameraMode for a detailed description of this function's behavior. If no value for mode is given, the global default set during SDK initialization is used.

    Parameters

    Returns Promise<CameraInfo[]>

    The gathered camera information

Generated using TypeDoc