Skip to content

Commit fff8fc7

Browse files
committed
fix(ios): type definitions
1 parent be3d550 commit fff8fc7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -518,12 +518,12 @@ Response for getting available camera devices.
518518

519519
Represents a physical camera device on the device.
520520

521-
| Prop | Type | Description |
522-
| -------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------- |
523-
| **`id`** | <code>string</code> | The unique identifier of the camera device |
524-
| **`name`** | <code>string</code> | The human-readable name of the camera device |
525-
| **`position`** | <code><a href="#cameraposition">CameraPosition</a></code> | The position of the camera device (front or back) |
526-
| **`type`** | <code><a href="#cameradevicetype">CameraDeviceType</a></code> | The type of the camera device (e.g., wide, ultra-wide, telephoto) - iOS only |
521+
| Prop | Type | Description |
522+
| ---------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------- |
523+
| **`id`** | <code>string</code> | The unique identifier of the camera device |
524+
| **`name`** | <code>string</code> | The human-readable name of the camera device |
525+
| **`position`** | <code><a href="#cameraposition">CameraPosition</a></code> | The position of the camera device (front or back) |
526+
| **`deviceType`** | <code><a href="#cameradevicetype">CameraDeviceType</a></code> | The type of the camera device (e.g., wide, ultra-wide, telephoto) - iOS only |
527527

528528

529529
#### GetZoomResponse

ios/Sources/CameraViewPlugin/CameraViewManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ internal let SUPPORTED_CAMERA_DEVICE_TYPES: [AVCaptureDevice.DeviceType] = [
167167
/// photo via capturePhoto
168168
/// - Parameter completion: called with the captured UIImage or an error.
169169
public func captureSnapshot(completion: @escaping (UIImage?, Error?) -> Void) {
170-
guard let cameraDevice = currentCameraDevice else {
170+
guard currentCameraDevice != nil else {
171171
completion(nil, CameraError.cameraUnavailable)
172172
return
173173
}

src/definitions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export interface CameraDevice {
223223
position: CameraPosition;
224224

225225
/** The type of the camera device (e.g., wide, ultra-wide, telephoto) - iOS only */
226-
type?: CameraDeviceType;
226+
deviceType?: CameraDeviceType;
227227
}
228228

229229
/**

0 commit comments

Comments
 (0)