Skip to main content
Version: Current

Camera Types

  • Photo

    Defines a photo that was taken.

    Members

    • data Blob

      The photo data.

    • height number

      The height of the photo in pixels.

    • width number

      The width of the photo in pixels.

  • PhotoCameraOptions

    Members

    • cameraType? CameraType

      The camera that should be used.

    • disallowSwitchingCameras? boolean

      Whether to not allow switching the camera.

    • idealResolution? object

      The ideal resolution for the photo to be taken at.

      If specified, then the web browser will be told to prefer this resolution, but will use a lower resolution if it is not possible to use the ideal resolution.

    • imageFormat? ("png" | "jpeg")

      The image format that should be used.

      Defaults to "png".

    • imageQuality? number

      A number between 0 and 1 indicating the image quality to be used.

      If not specified, then the browser will use its own default.

    • mirrorPhoto? boolean

      Whether to mirror the photo after it is taken.

      Defaults to false.

    • skipConfirm? boolean

      Whether to skip allowing the user to confirm their photo.

      Defaults to false.

    • takePhotoAfterSeconds? number

      Whether to automatically take a photo after a number of seconds.

      If null, then there is no timer and the user is allowed to take the photo manually. If positive, then the timer will start counting down from the given number of seconds. The user can always cancel the operation manually.