From 1112c8f12fc2764970bb81ed83455cde8b33fc37 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Mon, 22 Feb 2021 14:02:28 +0100 Subject: [PATCH] Update DEVICES.md --- docs/DEVICES.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/DEVICES.md b/docs/DEVICES.md index 251df13..dc2f08d 100644 --- a/docs/DEVICES.md +++ b/docs/DEVICES.md @@ -37,7 +37,9 @@ To get a list of all available camera devices, use the `getAvailableCameraDevice const devices = await Camera.getAvailableCameraDevices() ``` -A camera device (`CameraDevice`) contains a list of physical device type this camera device consists of. +> [🔗 See the `CameraDevice` type](./../src/CameraDevice.ts) + +A camera device (`CameraDevice`) contains a list of physical device types this camera device consists of. Example: * For a single Wide-Angle camera, this would be `["wide-angle-camera"]` @@ -54,6 +56,8 @@ console.log(deviceType) // --> "triple-camera" ``` +The `CameraDevice` type also contains other useful information describing a camera device, such as `position` ("front", "back", ...), `hasFlash`, it's `formats` (See [FORMATS.md](./FORMATS.md)), and more. + Make sure to carefully filter out unneeded camera devices, since not every phone supports all camera device types. Some phones don't even have front-cameras. ### `useCameraDevices` hook