expo-camera 13.4.0 → 13.4.2
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/CHANGELOG.md +12 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/camera/CameraViewModule.kt +5 -5
- package/android/src/main/java/expo/modules/camera/ExpoCameraView.kt +1 -1
- package/android/src/main/java/expo/modules/camera/Options.kt +1 -1
- package/ios/EXCamera/CameraViewModule.swift +4 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 13.4.2 — 2023-07-04
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fix crash when onBarCodeScanned or onFacesDetected callback is removed. ([#23223](https://github.com/expo/expo/pull/23223) by [@thespacemanatee](https://github.com/thespacemanatee))
|
|
18
|
+
|
|
19
|
+
## 13.4.1 — 2023-06-28
|
|
20
|
+
|
|
21
|
+
### 🐛 Bug fixes
|
|
22
|
+
|
|
23
|
+
- Resolved an issue on Android where recording a video, even with the mute: true option, would still result in an audio permission exception. Furthermore, the mute flag was incorrectly referred to as muteValue, causing it to be consistently ignored ([#23145](https://github.com/expo/expo/pull/23145) by [@hirbod](https://github.com/hirbod))
|
|
24
|
+
|
|
13
25
|
## 13.4.0 — 2023-06-13
|
|
14
26
|
|
|
15
27
|
- Fixed `Expo camera - Cannot take landscape photos if screen orientation is locked'` on iOS. ([#21938](https://github.com/expo/expo/issues/21938) by [@chalenascholl](https://github.com/chalenascholl)) ([#21956](https://github.com/expo/expo/pull/21956) by [@chalenascholl](https://github.com/chalenascholl))
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '13.4.
|
|
6
|
+
version = '13.4.2'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
9
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
@@ -67,7 +67,7 @@ android {
|
|
|
67
67
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
68
68
|
targetSdkVersion safeExtGet("targetSdkVersion", 33)
|
|
69
69
|
versionCode 32
|
|
70
|
-
versionName "13.4.
|
|
70
|
+
versionName "13.4.2"
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
lintOptions {
|
|
@@ -83,7 +83,7 @@ class CameraViewModule : Module() {
|
|
|
83
83
|
}.runOnQueue(Queues.MAIN)
|
|
84
84
|
|
|
85
85
|
AsyncFunction("record") { options: RecordingOptions, viewTag: Int, promise: Promise ->
|
|
86
|
-
if (!permissionsManager.hasGrantedPermissions(Manifest.permission.RECORD_AUDIO)) {
|
|
86
|
+
if (!options.mute && !permissionsManager.hasGrantedPermissions(Manifest.permission.RECORD_AUDIO)) {
|
|
87
87
|
throw Exceptions.MissingPermissions(Manifest.permission.RECORD_AUDIO)
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -238,12 +238,12 @@ class CameraViewModule : Module() {
|
|
|
238
238
|
view.cameraView.setUsingCamera2Api(useCamera2Api)
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
Prop("barCodeScannerEnabled") { view: ExpoCameraView, barCodeScannerEnabled: Boolean ->
|
|
242
|
-
view.setShouldScanBarCodes(barCodeScannerEnabled)
|
|
241
|
+
Prop("barCodeScannerEnabled") { view: ExpoCameraView, barCodeScannerEnabled: Boolean? ->
|
|
242
|
+
view.setShouldScanBarCodes(barCodeScannerEnabled ?: false)
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
Prop("faceDetectorEnabled") { view: ExpoCameraView, faceDetectorEnabled: Boolean ->
|
|
246
|
-
view.setShouldDetectFaces(faceDetectorEnabled)
|
|
245
|
+
Prop("faceDetectorEnabled") { view: ExpoCameraView, faceDetectorEnabled: Boolean? ->
|
|
246
|
+
view.setShouldDetectFaces(faceDetectorEnabled ?: false)
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
Prop("faceDetectorSettings") { view: ExpoCameraView, settings: Map<String, Any>? ->
|
|
@@ -165,7 +165,7 @@ class ExpoCameraView(
|
|
|
165
165
|
val path = FileSystemUtils.generateOutputPath(cacheDirectory, "Camera", ".mp4")
|
|
166
166
|
val profile = getCamcorderProfile(cameraView.cameraId, options.quality)
|
|
167
167
|
options.videoBitrate?.let { profile.videoBitRate = it }
|
|
168
|
-
if (cameraView.record(path, options.maxDuration * 1000, options.maxFileSize, !options.
|
|
168
|
+
if (cameraView.record(path, options.maxDuration * 1000, options.maxFileSize, !options.mute, profile)) {
|
|
169
169
|
videoRecordedPromise = promise
|
|
170
170
|
} else {
|
|
171
171
|
promise.reject("E_RECORDING_FAILED", "Starting video recording failed. Another recording might be in progress.", null)
|
|
@@ -19,6 +19,6 @@ class RecordingOptions : Record {
|
|
|
19
19
|
@Field val maxDuration: Int = -1
|
|
20
20
|
@Field val maxFileSize: Int = -1
|
|
21
21
|
@Field val quality: Int = CamcorderProfile.QUALITY_HIGH
|
|
22
|
-
@Field val
|
|
22
|
+
@Field val mute: Boolean = false
|
|
23
23
|
@Field val videoBitrate: Int? = null
|
|
24
24
|
}
|
|
@@ -126,15 +126,15 @@ public final class CameraViewModule: Module {
|
|
|
126
126
|
view.updatePictureSize()
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
Prop("faceDetectorEnabled") { (view, detectFaces: Bool) in
|
|
129
|
+
Prop("faceDetectorEnabled") { (view, detectFaces: Bool?) in
|
|
130
130
|
if view.isDetectingFaces != detectFaces {
|
|
131
|
-
view.isDetectingFaces = detectFaces
|
|
131
|
+
view.isDetectingFaces = detectFaces ?? false
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
Prop("barCodeScannerEnabled") { (view, scanBarCodes: Bool) in
|
|
135
|
+
Prop("barCodeScannerEnabled") { (view, scanBarCodes: Bool?) in
|
|
136
136
|
if view.isScanningBarCodes != scanBarCodes {
|
|
137
|
-
view.isScanningBarCodes = scanBarCodes
|
|
137
|
+
view.isScanningBarCodes = scanBarCodes ?? false
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-camera",
|
|
3
|
-
"version": "13.4.
|
|
3
|
+
"version": "13.4.2",
|
|
4
4
|
"description": "A React component that renders a preview for the device's either front or back camera. Camera's parameters like zoom, auto focus, white balance and flash mode are adjustable. With expo-camera, one can also take photos and record videos that are saved to the app's cache. Morever, the component is also capable of detecting faces and bar codes appearing on the preview.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"expo": "*"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "cf90d5c30c2a08a6493ebfa8aa3791aa70666759"
|
|
47
47
|
}
|