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.
- package/README.md +29 -14
- 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
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
|