Skip to content

Commit 729d5c9

Browse files
committed
Add version 2.5.0
1 parent 27fe4d0 commit 729d5c9

File tree

10 files changed

+80
-55
lines changed

10 files changed

+80
-55
lines changed

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## [2.5.0]
2+
3+
### Added
4+
5+
* [imgly_sdk] Added `ThemeOptions` which enable customizing the UI color scheme with existing or custom runtime `Theme`s on iOS and existing or custom compiletime XML themes on Android.
6+
* [imgly_sdk] Added `Configuration.toolbarMode` which enables repositioning the toolbar to the top/bottom of the editor on iOS.
7+
* [video_editor_sdk] Added implementation and documentation for GIPHY sticker integration.
8+
9+
### Fixed
10+
11+
* Fixed enabling serialization would potentially crash the export on Android.
12+
* [imgly_sdk] Fixed error when running on Android with Flutter 3.
13+
* [photo_editor_sdk] Fixed error when opening the editor without an image but with a serialization with an embedded image.
14+
* [video_editor_sdk] Fixed height and width of specified composition size would be flipped on Android.
15+
116
## [2.4.0]
217

318
### Changed

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add the plugin package to the `pubspec.yaml` file in your project:
2323

2424
```yaml
2525
dependencies:
26-
video_editor_sdk: ^2.4.0
26+
video_editor_sdk: ^2.5.0
2727
```
2828
2929
Install the new dependency:
@@ -34,7 +34,7 @@ flutter pub get
3434

3535
### Known Issues
3636

37-
With version `2.4.0`, we recommend using `compileSdkVersion` not lower than `31.0.0` for Android. However, this might interfere with your application's Android Gradle Plugin version if this is set to `4.x`.
37+
With version `2.4.0`, we recommend using `compileSdkVersion` not lower than `31` for Android. However, this might interfere with your application's Android Gradle Plugin version if this is set to `4.x`.
3838

3939
If you don't use a newer Android Gradle Plugin version you'll most likely encounter a build error similar to:
4040
```
@@ -95,12 +95,12 @@ Run with --stacktrace option to get the stack trace. Run with --info or --debug
9595
}
9696
dependencies {
9797
...
98-
+ classpath 'ly.img.android.sdk:plugin:10.0.1'
98+
+ classpath 'ly.img.android.sdk:plugin:10.1.1'
9999
...
100100
}
101101
}
102102
```
103-
In order to update VideoEditor SDK for Android replace the version string `10.0.1` with a [newer release](https://github.com/imgly/pesdk-android-demo/releases).
103+
In order to update VideoEditor SDK for Android replace the version string `10.1.1` with a [newer release](https://github.com/imgly/pesdk-android-demo/releases).
104104

105105
2. Still in the `android/build.gradle` file (**not** `android/app/build.gradle`), add these lines at the bottom:
106106

@@ -171,6 +171,7 @@ Run with --stacktrace option to get the stack trace. Run with --info or --debug
171171
include 'ui:video-library'
172172
include 'ui:video-composition'
173173
include 'ui:audio-composition'
174+
include 'ui:giphy-sticker'
174175

175176
// This module is big, remove the serializer if you don't need that feature.
176177
include 'backend:serializer'

android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ imglyConfig {
3939
}
4040
}
4141

42-
def MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION = "10.0.1"
42+
def MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION = "10.1.1"
4343

4444
task checkVersion {
4545
if (imglyConfig.convertToVersionNumber(imglyConfig.getVersion()) < imglyConfig.convertToVersionNumber(MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION)) {

android/src/main/kotlin/ly/img/flutter/video_editor_sdk/FlutterVESDK.kt

+41-40
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import android.app.Activity
44
import androidx.annotation.NonNull
55
import android.content.Intent
66
import android.net.Uri
7-
import android.os.Build
87
import android.util.Log
98

109
import io.flutter.embedding.engine.plugins.FlutterPlugin
@@ -23,6 +22,7 @@ import ly.img.android.sdk.config.*
2322
import ly.img.android.pesdk.backend.encoder.Encoder
2423
import ly.img.android.pesdk.backend.model.EditorSDKResult
2524
import ly.img.android.pesdk.backend.model.state.VideoCompositionSettings
25+
import ly.img.android.pesdk.utils.ThreadUtils
2626
import ly.img.android.serializer._3.IMGLYFileWriter
2727

2828
import org.json.JSONObject
@@ -50,7 +50,7 @@ class FlutterVESDK: FlutterIMGLY() {
5050

5151
override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) {
5252
if (this.result != null) {
53-
result?.error("Multiple requests.", "Cancelled due to multiple requests.", null)
53+
result.error("Multiple requests.", "Cancelled due to multiple requests.", null)
5454
return
5555
}
5656

@@ -78,7 +78,7 @@ class FlutterVESDK: FlutterIMGLY() {
7878
this.present(videos, config, serialization, size)
7979
}
8080
} else {
81-
result.error("VESDK", "The video must not be null", null)
81+
result.error("VE.SDK", "The video must not be null", null)
8282
}
8383
} else if (call.method == "unlock") {
8484
val license = call.argument<String>("license")
@@ -129,7 +129,7 @@ class FlutterVESDK: FlutterIMGLY() {
129129
if (videos != null && videos.count() > 0) {
130130
if (source == null) {
131131
if (size != null) {
132-
result?.error("VESDK", "Invalid video size: width and height must be greater than zero.", null)
132+
result?.error("VE.SDK", "Invalid video size: width and height must be greater than zero.", null)
133133
this.result = null
134134
return
135135
}
@@ -145,7 +145,7 @@ class FlutterVESDK: FlutterIMGLY() {
145145
}
146146
} else {
147147
if (source == null) {
148-
result?.error("VESDK", "A video composition without assets must have a specific size.", null)
148+
result?.error("VE.SDK", "A video composition without assets must have a specific size.", null)
149149
this.result = null
150150
return
151151
}
@@ -155,6 +155,8 @@ class FlutterVESDK: FlutterIMGLY() {
155155
it.source = source
156156
}
157157

158+
applyTheme(settingsList, configuration.theme)
159+
158160
readSerialisation(settingsList, serialization, false)
159161
startEditor(settingsList, EDITOR_RESULT_ID)
160162
}
@@ -178,7 +180,7 @@ class FlutterVESDK: FlutterIMGLY() {
178180
if (height == 0.0 || width == 0.0) {
179181
return null
180182
}
181-
return LoadSettings.compositionSource(height.toInt(), width.toInt(), 60)
183+
return LoadSettings.compositionSource(width.toInt(), height.toInt(), 60)
182184
}
183185

184186
/**
@@ -193,7 +195,7 @@ class FlutterVESDK: FlutterIMGLY() {
193195
this.result?.success(null)
194196
this.result = null
195197
} catch (e: AuthorizationException) {
196-
this.result?.error("Invalid license", "The license must be valid.", e.message)
198+
this.result?.error("VE.SDK", "The license is invalid.", e.message)
197199
this.result = null
198200
}
199201
}
@@ -212,46 +214,45 @@ class FlutterVESDK: FlutterIMGLY() {
212214
}
213215
return true
214216
} else if (resultCode == Activity.RESULT_OK && requestCode == EDITOR_RESULT_ID) {
215-
val serializationConfig = currentConfig?.export?.serialization
216-
val resultUri = intentData.resultUri
217-
val sourceUri = intentData.sourceUri
217+
ThreadUtils.runAsync {
218+
val serializationConfig = currentConfig?.export?.serialization
219+
val resultUri = intentData.resultUri
220+
val sourceUri = intentData.sourceUri
218221

219-
var serialization: Any? = null
220-
if (serializationConfig?.enabled == true) {
221-
val settingsList = intentData.settingsList
222-
skipIfNotExists {
223-
settingsList.let { settingsList ->
224-
if (serializationConfig.embedSourceImage == true) {
225-
Log.i("ImglySDK", "EmbedSourceImage is currently not supported by the Android SDK")
226-
}
227-
serialization = when (serializationConfig.exportType) {
228-
SerializationExportType.FILE_URL -> {
229-
val uri = serializationConfig.filename?.let {
230-
Uri.parse("$it.json")
231-
} ?: Uri.fromFile(File.createTempFile("serialization-" + UUID.randomUUID().toString(), ".json"))
232-
Encoder.createOutputStream(uri).use { outputStream ->
233-
IMGLYFileWriter(settingsList).writeJson(outputStream)
222+
var serialization: Any? = null
223+
if (serializationConfig?.enabled == true) {
224+
val settingsList = intentData.settingsList
225+
skipIfNotExists {
226+
settingsList.let { settingsList ->
227+
serialization = when (serializationConfig.exportType) {
228+
SerializationExportType.FILE_URL -> {
229+
val uri = serializationConfig.filename?.let {
230+
Uri.parse("$it.json")
231+
} ?: Uri.fromFile(File.createTempFile("serialization-" + UUID.randomUUID().toString(), ".json"))
232+
Encoder.createOutputStream(uri).use { outputStream ->
233+
IMGLYFileWriter(settingsList).writeJson(outputStream)
234+
}
235+
uri.toString()
236+
}
237+
SerializationExportType.OBJECT -> {
238+
jsonToMap(JSONObject(IMGLYFileWriter(settingsList).writeJsonAsString()))
234239
}
235-
uri.toString()
236-
}
237-
SerializationExportType.OBJECT -> {
238-
jsonToMap(JSONObject(IMGLYFileWriter(settingsList).writeJsonAsString()))
239240
}
240241
}
242+
settingsList.release()
243+
} ?: run {
244+
Log.e("IMG.LY SDK", "You need to include 'backend:serializer' Module, to use serialisation!")
241245
}
242-
settingsList.release()
243-
} ?: run {
244-
Log.i("ImglySDK", "You need to include 'backend:serializer' Module, to use serialisation!")
245246
}
246-
}
247247

248-
val map = mutableMapOf<String, Any?>()
249-
map["video"] = resultUri.toString()
250-
map["hasChanges"] = (sourceUri?.path != resultUri?.path)
251-
map["serialization"] = serialization
252-
currentActivity?.runOnUiThread {
253-
this.result?.success(map)
254-
this.result = null
248+
val map = mutableMapOf<String, Any?>()
249+
map["video"] = resultUri.toString()
250+
map["hasChanges"] = (sourceUri?.path != resultUri?.path)
251+
map["serialization"] = serialization
252+
currentActivity?.runOnUiThread {
253+
this.result?.success(map)
254+
this.result = null
255+
}
255256
}
256257
return true
257258
}

example/android/app/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ imglyConfig {
4242
include 'ui:video-library'
4343
include 'ui:video-composition'
4444
include 'ui:audio-composition'
45+
include 'ui:giphy-sticker'
4546

4647
// This module is big, remove the serializer if you don't need that feature.
4748
include 'backend:serializer'

example/android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
buildscript {
22
ext.kotlin_version = '1.5.32'
3-
ext.vesdk_version = '10.0.1'
3+
ext.vesdk_version = '10.1.1'
44

55
repositories {
66
google()

example/ios/Podfile.lock

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
PODS:
22
- Flutter (1.0.0)
3-
- imgly_sdk (2.4.0):
3+
- imgly_sdk (2.5.0):
44
- Flutter
5-
- imglyKit (~> 10.29)
6-
- imglyKit (10.30.0)
7-
- video_editor_sdk (2.4.0):
5+
- imglyKit (~> 10.30)
6+
- imglyKit (10.30.1)
7+
- video_editor_sdk (2.5.0):
88
- Flutter
99
- imgly_sdk
1010

@@ -27,9 +27,9 @@ EXTERNAL SOURCES:
2727

2828
SPEC CHECKSUMS:
2929
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
30-
imgly_sdk: 2d7b5dc391131eb2b7431333c6db1b515a77a578
31-
imglyKit: d5f3091f9980b97728c05b4144513b139313d8d7
32-
video_editor_sdk: 0f7aa0da4a0d737e75a5982244ae48c36127cfe9
30+
imgly_sdk: d8f93e1cbb33f6c27d0ab8f88ccceeeb819ca60d
31+
imglyKit: bb83829ba5d1af548772d61660556473f0391d1c
32+
video_editor_sdk: b7a26ee9ead44774e7fac73392a03f6907e3e8d3
3333

3434
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
3535

example/ios/Runner/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@
4141
</array>
4242
<key>UIViewControllerBasedStatusBarAppearance</key>
4343
<false/>
44+
<key>CADisableMinimumFrameDurationOnPhone</key>
45+
<true/>
4446
</dict>
4547
</plist>

example/lib/main.dart

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ class _MyAppState extends State<MyApp> {
3434
Sticker.existing("imgly_sticker_shapes_badge_01"),
3535
Sticker.existing("imgly_sticker_shapes_arrow_02")
3636
]);
37+
38+
/// A GIPHY sticker category.
39+
// final giphy = StickerCategory.giphy(
40+
// GiphyStickerProvider("YOUR-GIPHY-API-KEY"));
41+
3742
var categories = <StickerCategory>[logos, emoticons, shapes];
3843
final configuration = Configuration(
3944
sticker:

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: video_editor_sdk
22
description: The official Flutter plugin for VideoEditor SDK. Integrate the video editor into your own iOS or Android app - in minutes!
3-
version: 2.4.0
3+
version: 2.5.0
44
homepage: https://www.videoeditorsdk.com
55
repository: https://github.com/imgly/vesdk-flutter
66

@@ -11,7 +11,7 @@ environment:
1111
dependencies:
1212
flutter:
1313
sdk: flutter
14-
imgly_sdk: 2.4.0
14+
imgly_sdk: 2.5.0
1515

1616
dev_dependencies:
1717
flutter_test:

0 commit comments

Comments
 (0)