use-device-camera 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +29 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -126,29 +126,44 @@ function Snapshot() {
126
126
 
127
127
  ### `useCamera()`
128
128
 
129
+
129
130
  Returns:
130
- - `stream`: `MediaStream | null`
131
- - `devices`: `MediaDeviceInfo[]`
132
- - `requestPermission(constraints?)`: `Promise<MediaStream | null>`
133
- - `loadDevices()`: `Promise<MediaDeviceInfo[]>`
134
- - `cameraPermissionState`: `PermissionState`
135
- - `audioPermissionState`: `PermissionState`
131
+
132
+ | Property/Function | Type/Return Type |
133
+ | :--- | :--- |
134
+ | `stream` | `MediaStream \| null` |
135
+ | `devices` | `MediaDeviceInfo[]` |
136
+ | `requestPermission(constraints?)` | `Promise<MediaStream \| null>` |
137
+ | `loadDevices()` | `Promise<MediaDeviceInfo[]>` |
138
+ | `cameraPermissionState` | `PermissionState` |
139
+ | `audioPermissionState` | `PermissionState` |
140
+
141
+
136
142
 
137
143
  ### `useMediaTrack()`
138
144
 
139
145
  Returns:
140
- - `trackManager`: `MediaStreamTrack | undefined`
141
- - `applyConstraints(constraints)`: `Promise<void>`
142
- - `settings`: `MediaTrackSettings`
143
- - `capabilities`: `MediaTrackCapabilities`
146
+
147
+
148
+ | Property/Function | Type/Return Type |
149
+ | :--- | :--- |
150
+ | `trackManager` | `MediaStreamTrack \| undefined` |
151
+ | `applyConstraints(constraints)` | `Promise<void>` |
152
+ | `settings` | `MediaTrackSettings` |
153
+ | `capabilities` | `MediaTrackCapabilities` |
154
+
144
155
 
145
156
  ### `useImageCapture()`
146
157
 
147
158
  Returns:
148
- - `imageCaptureManager`: `ImageCapture | undefined`
149
- - `takePhoto(settings?)`: `Promise<Blob | null>`
150
- - `photoSettings`: `PhotoSettings`
151
- - `photoCapabilities`: `PhotoCapabilities`
159
+
160
+ | Property/Function | Type/Return Type |
161
+ | :--- | :--- |
162
+ | `imageCaptureManager` | `ImageCapture \| undefined` |
163
+ | `takePhoto(settings?)` | `Promise<Blob \| null>` |
164
+ | `photoSettings` | `PhotoSettings` |
165
+ | `photoCapabilities` | `PhotoCapabilities` |
166
+
152
167
 
153
168
  ## License
154
169
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-device-camera",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A React hook for easy camera device integration",
5
5
  "author": "JosephMG",
6
6
  "license": "MIT",