@imgly/camera-react-native 1.63.0 → 1.64.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/README.md +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/kotlin/ly/img/camera/reactnative/module/IMGLYCameraModule.kt +1 -1
- package/android/src/main/kotlin/ly/img/camera/reactnative/module/model/CameraSettings.kt +4 -4
- package/ios/Model/CameraSettings.swift +2 -2
- package/package.json +1 -1
- package/src/NativeIMGLYCamera.ts +2 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Visit our [documentation](https://img.ly/docs/cesdk) for more tutorials on how t
|
|
|
8
8
|
|
|
9
9
|
## License
|
|
10
10
|
|
|
11
|
-
The Camera SDK is a commercial product.
|
|
11
|
+
The Camera SDK is a commercial product. You can purchase a license at https://img.ly/pricing. Alternatively, you can use `null` as the license parameter to run the SDK in evaluation mode with a watermark.
|
|
12
12
|
|
|
13
13
|
## Integration
|
|
14
14
|
|
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.64.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"
|
|
@@ -124,7 +124,7 @@ class IMGLYCameraModule(
|
|
|
124
124
|
metadata: Map<String, Any?>?,
|
|
125
125
|
completion: ((Result<CameraResult?>) -> Unit),
|
|
126
126
|
) {
|
|
127
|
-
val activity = this.currentActivity ?: return
|
|
127
|
+
val activity = this.reactApplicationContext.currentActivity ?: return
|
|
128
128
|
this.completion = completion
|
|
129
129
|
|
|
130
130
|
val engineConfiguration =
|
|
@@ -6,11 +6,11 @@ import android.os.Parcelable
|
|
|
6
6
|
/**
|
|
7
7
|
* A class containing all necessary information to configure the camera.
|
|
8
8
|
*
|
|
9
|
-
* @property license The license key.
|
|
9
|
+
* @property license The license key. Pass `null` to run the SDK in evaluation mode with a watermark.
|
|
10
10
|
* @property userId The id of the current user.
|
|
11
11
|
*/
|
|
12
12
|
data class CameraSettings(
|
|
13
|
-
val license: String,
|
|
13
|
+
val license: String? = null,
|
|
14
14
|
val userId: String?,
|
|
15
15
|
) : Parcelable {
|
|
16
16
|
/**
|
|
@@ -18,7 +18,7 @@ data class CameraSettings(
|
|
|
18
18
|
* @param parcel The [Parcel].
|
|
19
19
|
*/
|
|
20
20
|
constructor(parcel: Parcel) : this(
|
|
21
|
-
parcel.readString()
|
|
21
|
+
parcel.readString(),
|
|
22
22
|
parcel.readString(),
|
|
23
23
|
)
|
|
24
24
|
|
|
@@ -38,7 +38,7 @@ data class CameraSettings(
|
|
|
38
38
|
override fun newArray(size: Int): Array<CameraSettings?> = arrayOfNulls(size)
|
|
39
39
|
|
|
40
40
|
fun createFromMap(map: Map<String, Any?>): CameraSettings {
|
|
41
|
-
val license = map["license"] as? String
|
|
41
|
+
val license = map["license"] as? String
|
|
42
42
|
val userId = map["userId"] as? String
|
|
43
43
|
return CameraSettings(license, userId)
|
|
44
44
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// A struct containing all necessary settings to setup the camera.
|
|
2
2
|
@objc @objcMembers public class CameraSettings: NSObject, Codable {
|
|
3
|
-
/// The license key.
|
|
4
|
-
public let license: String
|
|
3
|
+
/// The license key. Pass `nil` to run the SDK in evaluation mode with a watermark.
|
|
4
|
+
public let license: String?
|
|
5
5
|
|
|
6
6
|
/// The id of the current user.
|
|
7
7
|
public let userId: String?
|
package/package.json
CHANGED
package/src/NativeIMGLYCamera.ts
CHANGED
|
@@ -75,8 +75,8 @@ interface CameraResult {
|
|
|
75
75
|
|
|
76
76
|
/** A class containing all necessary settings to setup the camera. */
|
|
77
77
|
export interface CameraSettings {
|
|
78
|
-
/** The license of the editor. */
|
|
79
|
-
license
|
|
78
|
+
/** The license of the editor. Pass `null` to run the SDK in evaluation mode with a watermark. */
|
|
79
|
+
license?: string;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Unique ID tied to your application's user.
|