@capgo/camera-preview 7.2.5 → 7.2.7
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.
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
package/android/gradlew
CHANGED
|
@@ -114,7 +114,7 @@ case "$( uname )" in #(
|
|
|
114
114
|
NONSTOP* ) nonstop=true ;;
|
|
115
115
|
esac
|
|
116
116
|
|
|
117
|
-
CLASSPATH
|
|
117
|
+
CLASSPATH="\\\"\\\""
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
# Determine the Java command to use to start the JVM.
|
|
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
|
213
213
|
set -- \
|
|
214
214
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
215
215
|
-classpath "$CLASSPATH" \
|
|
216
|
-
|
|
216
|
+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
|
217
217
|
"$@"
|
|
218
218
|
|
|
219
219
|
# Stop when "xargs" is not available.
|
package/android/gradlew.bat
CHANGED
|
@@ -70,11 +70,11 @@ goto fail
|
|
|
70
70
|
:execute
|
|
71
71
|
@rem Setup the command line
|
|
72
72
|
|
|
73
|
-
set CLASSPATH
|
|
73
|
+
set CLASSPATH=
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
@rem Execute Gradle
|
|
77
|
-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%"
|
|
77
|
+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
|
78
78
|
|
|
79
79
|
:end
|
|
80
80
|
@rem End local scope for the variables with windows NT shell
|
|
@@ -428,7 +428,32 @@ extension CameraController {
|
|
|
428
428
|
} catch {
|
|
429
429
|
throw CameraControllerError.invalidOperation
|
|
430
430
|
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
func cleanup() {
|
|
434
|
+
if let captureSession = self.captureSession {
|
|
435
|
+
captureSession.stopRunning()
|
|
436
|
+
captureSession.inputs.forEach { captureSession.removeInput($0) }
|
|
437
|
+
captureSession.outputs.forEach { captureSession.removeOutput($0) }
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
self.previewLayer?.removeFromSuperlayer()
|
|
441
|
+
self.previewLayer = nil
|
|
442
|
+
|
|
443
|
+
self.frontCameraInput = nil
|
|
444
|
+
self.rearCameraInput = nil
|
|
445
|
+
self.audioInput = nil
|
|
446
|
+
|
|
447
|
+
self.frontCamera = nil
|
|
448
|
+
self.rearCamera = nil
|
|
449
|
+
self.audioDevice = nil
|
|
450
|
+
|
|
451
|
+
self.dataOutput = nil
|
|
452
|
+
self.photoOutput = nil
|
|
453
|
+
self.fileVideoOutput = nil
|
|
431
454
|
|
|
455
|
+
self.captureSession = nil
|
|
456
|
+
self.currentCameraPosition = nil
|
|
432
457
|
}
|
|
433
458
|
|
|
434
459
|
func captureVideo() throws {
|
package/ios/Plugin/Plugin.swift
CHANGED
|
@@ -281,17 +281,19 @@ public class CameraPreview: CAPPlugin, CAPBridgedPlugin {
|
|
|
281
281
|
call.reject("camera not initialized")
|
|
282
282
|
return
|
|
283
283
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
self.webView?.isOpaque = true
|
|
290
|
-
self.isInitialized = false
|
|
291
|
-
call.resolve()
|
|
292
|
-
} else {
|
|
293
|
-
call.reject("camera already stopped")
|
|
284
|
+
|
|
285
|
+
// Always attempt to stop and clean up, regardless of captureSession state
|
|
286
|
+
if let previewView = self.previewView {
|
|
287
|
+
previewView.removeFromSuperview()
|
|
288
|
+
self.previewView = nil
|
|
294
289
|
}
|
|
290
|
+
|
|
291
|
+
self.webView?.isOpaque = true
|
|
292
|
+
self.isInitialized = false
|
|
293
|
+
self.isInitializing = false
|
|
294
|
+
self.cameraController.cleanup()
|
|
295
|
+
|
|
296
|
+
call.resolve()
|
|
295
297
|
}
|
|
296
298
|
}
|
|
297
299
|
// Get user's cache directory path
|