@@ -33,6 +33,7 @@ import io.ionic.libs.ioncameralib.manager.IONCAMRGalleryManager
3333import io.ionic.libs.ioncameralib.manager.IONCAMRVideoManager
3434import io.ionic.libs.ioncameralib.model.IONCAMRCameraParameters
3535import io.ionic.libs.ioncameralib.model.IONCAMREditParameters
36+ import io.ionic.libs.ioncameralib.model.IONCAMRVideoParameters
3637import io.ionic.libs.ioncameralib.model.IONCAMRError
3738import io.ionic.libs.ioncameralib.model.IONCAMRMediaResult
3839import io.ionic.libs.ioncameralib.model.IONCAMRMediaType
@@ -62,11 +63,11 @@ class IonCameraFlow(
6263 private lateinit var editLauncher: ActivityResultLauncher <Intent >
6364 private var currentCall: PluginCall ? = null
6465 private var cameraSettings: IonCameraSettings ? = null
65- private var videoSettings: IonVideoSettings ? = null
6666 private var gallerySettings: IonGallerySettings ? = null
6767 private var editParameters = IONCAMREditParameters (
6868 editURI = " " , fromUri = false , saveToGallery = false , includeMetadata = false
6969 )
70+ private var videoParameters: IONCAMRVideoParameters ? = null
7071 private var lastEditUri: String? = null
7172
7273 companion object {
@@ -118,7 +119,7 @@ class IonCameraFlow(
118119 }
119120
120121 fun recordVideo (call : PluginCall ) {
121- videoSettings = getVideoSettings(call)
122+ videoParameters = getVideoSettings(call)
122123 currentCall = call
123124 openRecordVideo(call)
124125 }
@@ -186,8 +187,8 @@ class IonCameraFlow(
186187
187188 }
188189
189- fun getVideoSettings (call : PluginCall ): IonVideoSettings {
190- return IonVideoSettings (
190+ fun getVideoSettings (call : PluginCall ): IONCAMRVideoParameters {
191+ return IONCAMRVideoParameters (
191192 saveToGallery = call.getBoolean(" saveToGallery" ) ? : false ,
192193 includeMetadata = call.getBoolean(" includeMetadata" ) ? : false ,
193194 isPersistent = call.getBoolean(" isPersistent" ) ? : true
@@ -273,7 +274,7 @@ class IonCameraFlow(
273274 }
274275
275276 fun openRecordVideo (call : PluginCall ) {
276- val settings = videoSettings ? : run {
277+ val settings = videoParameters ? : run {
277278 sendError(IONCAMRError .INVALID_ARGUMENT_ERROR )
278279 return
279280 }
@@ -350,6 +351,7 @@ class IonCameraFlow(
350351 saveToGallery = false ,
351352 includeMetadata = false
352353 )
354+
353355 val imageBase64 = call.getString(" inputImage" )
354356 if (imageBase64 == null ) return
355357 manager.editImage(activity, imageBase64, editLauncher)
@@ -857,7 +859,7 @@ class IonCameraFlow(
857859 sendError(IONCAMRError .CAPTURE_VIDEO_ERROR )
858860 return
859861 }
860- val settings = videoSettings ? : run {
862+ val settings = videoParameters ? : run {
861863 sendError(IONCAMRError .INVALID_ARGUMENT_ERROR )
862864 return
863865 }
0 commit comments