@imgly/camera-react-native 1.55.1 → 1.56.0
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/android/build.gradle
CHANGED
|
@@ -78,7 +78,7 @@ repositories {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
dependencies {
|
|
81
|
-
implementation findProject(":camera") ?: "ly.img:camera:1.
|
|
81
|
+
implementation findProject(":camera") ?: "ly.img:camera:1.56.0"
|
|
82
82
|
implementation platform("androidx.compose:compose-bom:2023.05.01")
|
|
83
83
|
implementation "androidx.activity:activity-compose:1.6.1"
|
|
84
84
|
implementation "androidx.activity:activity:1.7.0"
|
|
@@ -18,7 +18,7 @@ import ly.img.camera.reactnative.module.model.CameraResult
|
|
|
18
18
|
import ly.img.camera.reactnative.module.model.CameraSettings
|
|
19
19
|
|
|
20
20
|
/** A closure to specify a [CaptureVideo.Input] the camera session based on given *metadata*. */
|
|
21
|
-
typealias CameraInputClosure = (metadata: Map<String, Any
|
|
21
|
+
typealias CameraInputClosure = (metadata: Map<String, Any?>?) -> CaptureVideo.Input
|
|
22
22
|
|
|
23
23
|
/** A closure to modify the [CameraResult] before being send to the JS layer. */
|
|
24
24
|
typealias CameraResultClosure = (result: CameraResult?) -> CameraResult?
|
|
@@ -121,7 +121,7 @@ class IMGLYCameraModule(
|
|
|
121
121
|
private fun openCamera(
|
|
122
122
|
settings: CameraSettings,
|
|
123
123
|
video: String?,
|
|
124
|
-
metadata: Map<String, Any
|
|
124
|
+
metadata: Map<String, Any?>?,
|
|
125
125
|
completion: ((Result<CameraResult?>) -> Unit),
|
|
126
126
|
) {
|
|
127
127
|
val activity = this.currentActivity ?: return
|
|
@@ -37,7 +37,7 @@ data class CameraSettings(
|
|
|
37
37
|
|
|
38
38
|
override fun newArray(size: Int): Array<CameraSettings?> = arrayOfNulls(size)
|
|
39
39
|
|
|
40
|
-
fun createFromMap(map: Map<String, Any
|
|
40
|
+
fun createFromMap(map: Map<String, Any?>): CameraSettings {
|
|
41
41
|
val license = map["license"] as? String ?: throw (Exception("Missing value for key 'license.'"))
|
|
42
42
|
val userId = map["userId"] as? String
|
|
43
43
|
return CameraSettings(license, userId)
|
package/package.json
CHANGED