* Automatically build API documentation using Typedoc and Docusaurus * Move MD and move to MDX for Docusaurus Guides
1.3 KiB
1.3 KiB
id | title | sidebar_label | custom_edit_url | hide_title |
---|---|---|---|---|
hooks_usecameraformat | Module: hooks/useCameraFormat | hooks/useCameraFormat | null | true |
Module: hooks/useCameraFormat
Functions
useCameraFormat
▸ useCameraFormat(device?
: CameraDevice, cameraViewSize?
: Size): CameraDeviceFormat | undefined
Returns the best format for the given camera device.
This function tries to choose a format with the highest possible photo-capture resolution and best matching aspect ratio.
Parameters:
Name | Type | Description |
---|---|---|
device? |
CameraDevice | The Camera Device |
cameraViewSize? |
Size | The Camera View's size. This can be an approximation and must be memoized! Default: SCREEN_SIZE |
Returns: CameraDeviceFormat | undefined
The best matching format for the given camera device, or undefined
if the camera device is undefined
.
Defined in: src/hooks/useCameraFormat.ts:16