Skip to content

Commit 930587d

Browse files
feat: add isPersistent to RecordVideo
1 parent db7e21b commit 930587d

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

android/src/main/java/com/capacitorjs/plugins/camera/CameraPlugin.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ class CameraPlugin : Plugin() {
253253
fun getVideoSettings(call: PluginCall): VideoSettings {
254254
return VideoSettings(
255255
saveToGallery = call.getBoolean("saveToGallery") ?: false,
256-
includeMetadata = call.getBoolean("includeMetadata") ?: false
256+
includeMetadata = call.getBoolean("includeMetadata") ?: false,
257+
isPersistent = call.getBoolean("isPersistent") ?: true
257258
)
258259
}
259260

android/src/main/java/com/capacitorjs/plugins/camera/IonCameraFlow.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ class IonCameraFlow(
6565
setupLaunchers()
6666
cameraManager = IONCAMRCameraManager(
6767
plugin.getAppId(),
68-
".fileprovider",
68+
".camera.provider",
6969
IONCAMRExifHelper(),
7070
IONCAMRFileHelper(),
7171
IONCAMRMediaHelper(),
7272
IONCAMRImageHelper()
7373
)
7474

7575
videoManager = IONCAMRVideoManager(
76-
".fileprovider",
76+
".camera.provider",
7777
IONCAMRFileHelper(),
7878
)
7979

@@ -86,7 +86,7 @@ class IonCameraFlow(
8686

8787
editManager = IONCAMREditManager(
8888
plugin.getAppId(),
89-
".fileprovider",
89+
".camera.provider",
9090
IONCAMRExifHelper(),
9191
IONCAMRFileHelper(),
9292
IONCAMRMediaHelper(),
@@ -527,7 +527,7 @@ class IonCameraFlow(
527527
val uri = Uri.fromFile(file)
528528

529529
val ret = JSObject()
530-
ret.put("path", mediaResult.uri)
530+
ret.put("uri", mediaResult.uri)
531531
ret.put("webPath", FileUtils.getPortablePath(plugin.context, plugin.bridge.localUrl, uri))
532532
ret.put("saved", mediaResult.saved)
533533

@@ -622,6 +622,7 @@ class IonCameraFlow(
622622
plugin.activity,
623623
uri,
624624
settings.saveToGallery,
625+
settings.isPersistent,
625626
settings.includeMetadata,
626627
{ mediaResult ->
627628
handleVideoMediaResult(mediaResult)

android/src/main/java/com/capacitorjs/plugins/camera/VideoSettings.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ package com.capacitorjs.plugins.camera
22

33
data class VideoSettings(
44
val saveToGallery: Boolean = false,
5-
val includeMetadata: Boolean = false
5+
val includeMetadata: Boolean = false,
6+
val isPersistent: Boolean = true
67
)

0 commit comments

Comments
 (0)