Feature/supports focus (#72)
* Add `supportsFocus` prop to CameraDevice * Add true-depth camera again * Revert "Add true-depth camera again" This reverts commit 5814b8ca7a15b3273ff29498144bb352619a4c1d.
This commit is contained in:
parent
8eb8dbeb6a
commit
db8960580f
@ -184,6 +184,7 @@ class CameraViewModule(reactContext: ReactApplicationContext) : ReactContextBase
|
|||||||
map.putBoolean("supportsRawCapture", supportsRawCapture)
|
map.putBoolean("supportsRawCapture", supportsRawCapture)
|
||||||
map.putBoolean("supportsDepthCapture", supportsDepthCapture)
|
map.putBoolean("supportsDepthCapture", supportsDepthCapture)
|
||||||
map.putBoolean("supportsLowLightBoost", supportsLowLightBoost)
|
map.putBoolean("supportsLowLightBoost", supportsLowLightBoost)
|
||||||
|
map.putBoolean("supportsFocus", true) // I believe every device here supports focussing
|
||||||
if (zoomRange != null) {
|
if (zoomRange != null) {
|
||||||
map.putDouble("minZoom", zoomRange.lower.toDouble())
|
map.putDouble("minZoom", zoomRange.lower.toDouble())
|
||||||
map.putDouble("maxZoom", zoomRange.upper.toDouble())
|
map.putDouble("maxZoom", zoomRange.upper.toDouble())
|
||||||
|
@ -111,6 +111,7 @@ final class CameraViewManager: RCTViewManager {
|
|||||||
"supportsDepthCapture": false, // TODO: supportsDepthCapture
|
"supportsDepthCapture": false, // TODO: supportsDepthCapture
|
||||||
"supportsRawCapture": false, // TODO: supportsRawCapture
|
"supportsRawCapture": false, // TODO: supportsRawCapture
|
||||||
"supportsLowLightBoost": $0.isLowLightBoostSupported,
|
"supportsLowLightBoost": $0.isLowLightBoostSupported,
|
||||||
|
"supportsFocus": $0.isFocusPointOfInterestSupported,
|
||||||
"formats": $0.formats.map { (format) -> [String: Any] in
|
"formats": $0.formats.map { (format) -> [String: Any] in
|
||||||
format.toDictionary()
|
format.toDictionary()
|
||||||
},
|
},
|
||||||
|
@ -220,15 +220,20 @@ export interface CameraDevice {
|
|||||||
* Whether this camera device supports low light boost.
|
* Whether this camera device supports low light boost.
|
||||||
*/
|
*/
|
||||||
supportsLowLightBoost: boolean;
|
supportsLowLightBoost: boolean;
|
||||||
|
/**
|
||||||
// TODO: supportsDepthCapture
|
* Whether this camera supports taking photos with depth data.
|
||||||
// /**
|
*
|
||||||
// * Whether this camera supports taking photos with depth data
|
* **! Work in Progress !**
|
||||||
// */
|
*/
|
||||||
// supportsDepthCapture: boolean;
|
supportsDepthCapture: boolean;
|
||||||
// TODO: supportsRawCapture
|
/**
|
||||||
// /**
|
* Whether this camera supports taking photos in RAW format
|
||||||
// * Whether this camera supports taking photos in RAW format
|
*
|
||||||
// */
|
* **! Work in Progress !**
|
||||||
// supportsRawCapture: boolean;
|
*/
|
||||||
|
supportsRawCapture: boolean;
|
||||||
|
/**
|
||||||
|
* Specifies whether this device supports focussing ({@linkcode Camera.focus | Camera.focus(...)})
|
||||||
|
*/
|
||||||
|
supportsFocus: boolean;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user