Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
69cdaf6
feat: add web implementation for takePhoto and chooseFromGallery
alexgerardojacinto Mar 23, 2026
fda773f
Merge branch 'feat/RMET-4099/camera-unification' into feat/RMET-5029/…
OS-pedrogustavobilro Mar 24, 2026
6f2504b
feat: get resolution for images and videos
alexgerardojacinto Mar 24, 2026
ce960fe
refactor: remove redundant assign
alexgerardojacinto Mar 24, 2026
96e5abf
fix: use rear camera as default
alexgerardojacinto Mar 24, 2026
a05e1df
feat: add size, creationDate, and duration to new Web functions
alexgerardojacinto Mar 24, 2026
ebdf7ae
fix: remove limit parameter from Web
alexgerardojacinto Mar 24, 2026
8db1dbd
fix: add thumbnail to chooseFromGallery, for both images and videos
alexgerardojacinto Mar 24, 2026
99f89c5
refactor: remove duplicated code
alexgerardojacinto Mar 24, 2026
5463939
feat: use includeMetadata for takePhoto and chooseFromGallery on Web
alexgerardojacinto Mar 24, 2026
db31e98
fix: show photos on older methods when resultType base64 or dataUrl
OS-ruimoreiramendes Mar 24, 2026
8b0f1c5
refactor: avoid code duplication and improve event listeners
alexgerardojacinto Mar 24, 2026
0f4c9f3
chore(android): update Android bridge with new lib version
alexgerardojacinto Mar 24, 2026
d0d2a6f
chore: remove redundant doc
alexgerardojacinto Mar 25, 2026
6573fec
chore: update docs
alexgerardojacinto Mar 25, 2026
2ca8617
chore: update docs
alexgerardojacinto Mar 25, 2026
aeaadff
chore: update src/definitions.ts
alexgerardojacinto Mar 25, 2026
8998b2c
refactor: make Photo.saved optional like other parameters (e.g. exif)
alexgerardojacinto Mar 25, 2026
8e3f565
refactor: make MediaMetadata.resolution optional
alexgerardojacinto Mar 25, 2026
92ede10
refactor: remove duplicated code
alexgerardojacinto Mar 25, 2026
6772ebc
refactor: avoid returning 0 resolution
alexgerardojacinto Mar 25, 2026
2e37fc9
fix: always return video thumbnail
alexgerardojacinto Mar 25, 2026
17525f6
fix: remove resolution from if condition
alexgerardojacinto Mar 25, 2026
02bd832
chore: run prettier to fix lint issues
alexgerardojacinto Mar 25, 2026
87c4740
added new video parameters and remove videoSettings
OS-ruimoreiramendes Mar 25, 2026
bb17258
Merge branch 'feat/RMET-5029/update-web' into feat/add-video-parameters
OS-ruimoreiramendes Mar 25, 2026
c53bb1a
revert editParameters changes
OS-ruimoreiramendes Mar 25, 2026
27da04d
fix conflicts
OS-ruimoreiramendes Mar 26, 2026
72efd81
remove optinal on saved
OS-ruimoreiramendes Mar 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import io.ionic.libs.ioncameralib.manager.IONCAMRGalleryManager
import io.ionic.libs.ioncameralib.manager.IONCAMRVideoManager
import io.ionic.libs.ioncameralib.model.IONCAMRCameraParameters
import io.ionic.libs.ioncameralib.model.IONCAMREditParameters
import io.ionic.libs.ioncameralib.model.IONCAMRVideoParameters
import io.ionic.libs.ioncameralib.model.IONCAMRError
import io.ionic.libs.ioncameralib.model.IONCAMRMediaResult
import io.ionic.libs.ioncameralib.model.IONCAMRMediaType
Expand Down Expand Up @@ -62,11 +63,11 @@ class IonCameraFlow(
private lateinit var editLauncher: ActivityResultLauncher<Intent>
private var currentCall: PluginCall? = null
private var cameraSettings: IonCameraSettings? = null
private var videoSettings: IonVideoSettings? = null
private var gallerySettings: IonGallerySettings? = null
private var editParameters = IONCAMREditParameters(
editURI = "", fromUri = false, saveToGallery = false, includeMetadata = false
)
private var videoParameters: IONCAMRVideoParameters? = null
private var lastEditUri: String? = null

companion object {
Expand Down Expand Up @@ -118,7 +119,7 @@ class IonCameraFlow(
}

fun recordVideo(call: PluginCall) {
videoSettings = getVideoSettings(call)
videoParameters = getVideoSettings(call)
currentCall = call
openRecordVideo(call)
}
Expand Down Expand Up @@ -186,8 +187,8 @@ class IonCameraFlow(

}

fun getVideoSettings(call: PluginCall): IonVideoSettings {
return IonVideoSettings(
fun getVideoSettings(call: PluginCall): IONCAMRVideoParameters {
return IONCAMRVideoParameters(
saveToGallery = call.getBoolean("saveToGallery") ?: false,
includeMetadata = call.getBoolean("includeMetadata") ?: false,
isPersistent = call.getBoolean("isPersistent") ?: true
Expand Down Expand Up @@ -273,7 +274,7 @@ class IonCameraFlow(
}

fun openRecordVideo(call: PluginCall) {
val settings = videoSettings ?: run {
val settings = videoParameters ?: run {
sendError(IONCAMRError.INVALID_ARGUMENT_ERROR)
return
}
Expand Down Expand Up @@ -350,6 +351,7 @@ class IonCameraFlow(
saveToGallery = false,
includeMetadata = false
)

val imageBase64 = call.getString("inputImage")
if (imageBase64 == null) return
manager.editImage(activity, imageBase64, editLauncher)
Expand Down Expand Up @@ -857,7 +859,7 @@ class IonCameraFlow(
sendError(IONCAMRError.CAPTURE_VIDEO_ERROR)
return
}
val settings = videoSettings ?: run {
val settings = videoParameters ?: run {
sendError(IONCAMRError.INVALID_ARGUMENT_ERROR)
return
}
Expand Down

This file was deleted.

Loading