Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
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
79 changes: 79 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,82 @@
## [2.17.1]

### Fixed

* [react-native-imglysdk] Fixed wrong default SDK version for Android.

## [2.17.0]

### Added

* Added `configuration.singleToolMode` that skips main menu if only one tool is used.
* [react-native-videoeditorsdk] Added `RNVideoEditorSDKModule.editorWillOpenClosure` and `RNVideoEditorSDKModule.editorWillExportClosure` which allow further native configuration on Android.
* [react-native-photoeditorsdk] Added `RNPhotoEditorSDKModule.editorWillOpenClosure` and `RNPhotoEditorSDKModule.editorWillExportClosure` which allow further native configuration on Android.

### Fixed

* [react-native-videoeditorsdk] Fixed `VideoEditorResult.videoSize` would always be zero.
* [react-native-videoeditorsdk] Fixed error when not setting `Configuration.export.video.segments`.

## [2.16.1]

### Fixed

* [react-native-videoeditorsdk] Fixed error when cancelling the editor.
* [react-native-videoeditorsdk] Fixed missing export of `VideoSegment` type.
* [react-native-videoeditorsdk] Fixed wrong types for `VESDK.openEditor`.

## [2.16.0]

### Added

* [react-native-videoeditorsdk] Added duration action for text and stickers.
* [react-native-videoeditorsdk] Added `VideoEditorResult.segments`, `VideoEditorResult.videoSize`, and `VideoEditorResult.release()` which enable serialization of the individual video composition components if `configuration.export.video.segments` is enabled.

## [2.15.0]

### Changed

* 🚨 Bumped iOS deployment target to 13.0.
* [react-native-videoeditorsdk] Raised minimum VideoEditor SDK for iOS version to 11.1.0. See the [changelog](https://github.com/imgly/vesdk-ios-build/blob/master/CHANGELOG.md) for more information.
* [react-native-photoeditorsdk] Raised minimum PhotoEditor SDK for iOS version to 11.1.0. See the [changelog](https://github.com/imgly/pesdk-ios-build/blob/master/CHANGELOG.md) for more information.

### Added

* Added implementation and documentation for background removal.

## [2.14.0]

### Added

* [react-native-videoeditorsdk] Added implementation and documentation for GIPHY sticker integration.

### Fixed

* [react-native-videoeditorsdk] Fixed `VESDK.openEditor` return type declaration and API documentation to return `Promise<VideoEditorResult | null>` instead of just `Promise<VideoEditorResult>`.
* [react-native-videoeditorsdk] Fixed height and width of specified composition size would be flipped on Android.
* [react-native-photoeditorsdk] Fixed `PESDK.openEditor` return type declaration and API documentation to return `Promise<PhotoEditorResult | null>` instead of just `Promise<PhotoEditorResult>`.
* [react-native-photoeditorsdk] Fixed deprecation warning for `RCTBridge.imageLoader` on iOS.


## [2.13.1]

### Fixed

* Fixed enabling serialization would crash the application on Android when exporting.

## [2.13.0]

### Changed

* 🚨 With this version you might need to create symlinks when using Android Gradle Plugin version `4.x`. Please refer to the new [known issues](https://github.com/imgly/vesdk-react-native#known-issues) section of the README for details.
* 🚨 This version requires `minSdkVersion` `21` for Android. Please refer to the new step 3 in the [getting started](https://github.com/imgly/vesdk-react-native#android) section of the README for instructions on how to adjust it.
* [react-native-videoeditorsdk] Raised minimum VideoEditor SDK for Android version to 10.0.1. See the [changelog](https://github.com/imgly/vesdk-android-demo/blob/master/CHANGELOG.md) for more information.
* [react-native-photoeditorsdk] Raised minimum PhotoEditor SDK for Android version to 10.0.1. See the [changelog](https://github.com/imgly/pesdk-android-demo/blob/master/CHANGELOG.md) for more information.

### Added

* [react-native-imglysdk] Added support to specify a custom `buildToolsVersion`, `minSdkVersion`, `compileSdkVersion`, `targetSdkVersion`, and `kotlinGradlePluginVersion` for Android with the Expo config plugin.

## [2.12.0]

### Changed
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In order to run any samples or use any wrapper without a watermark,
you'll have to purchase a commercial PhotoEditor SDK or VideoEditor SDK
license. Visit https://img.ly for more details.

Copyright (c) 2014-2022, img.ly GmbH
Copyright (c) 2014-2023, img.ly GmbH
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
112 changes: 78 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,38 @@

Check out our [video tutorial](https://img.ly/blog/a-photo-and-video-editor-for-your-react-native-apps/) for a step-by-step integration guide which also details advanced SDK features, such as serializing and reusing previously applied editing operations.

## System requirements

- React Native: 0.60
- iOS: 13
- Android: 5 (SDK 21)

## Getting started

### Known Issues

With version `2.13.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`.

If you don't use a newer Android Gradle Plugin version, e.g., by updating at least to RN 0.68.0, you'll most likely encounter a build error similar to:

```
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':react-native-videoeditorsdk'.
> com.android.builder.errors.EvalIssueException: Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
```

As a workaround you can create the following symlinks:

1. Inside `/Users/YOUR-USERNAME/Library/Android/sdk/build-tools/31.0.0/`: Create a `dx` symlink for the `d8` file with `ln -s d8 dx`.
2. From there, go to `./lib/` and create a `dx.jar` symlink for the `d8.jar` file with `ln -s d8.jar dx.jar`.

### Expo CLI

#### Limitations
Expand All @@ -36,7 +66,7 @@ In order to use this module with the Expo CLI you can make use of our integrated
```sh
expo install react-native-videoeditorsdk
```

This will automatically install [`react-native-imglysdk`](https://npmjs.org/package/react-native-imglysdk) which you can use to configure your application with our Expo config plugin.

2. Inside your app's `app.json` or `app.config.js` add our config plugin:
Expand All @@ -47,7 +77,7 @@ In order to use this module with the Expo CLI you can make use of our integrated
}
```

If needed, you can also use a specific version of our native library for Android as well as define explicitly the included modules. By default, all modules for both PhotoEditor SDK and VideoEditor SDK are included.
If needed, you can also use a specific version of our native library for Android as well as define explicitly the included modules. By default, all modules for both PhotoEditor SDK and VideoEditor SDK are included. Furthermore, you can configure the `buildToolsVersion`, `minSdkVersion`, `compileSdkVersion`, `targetSdkVersion`, and `kotlinGradlePluginVersion`.

```json
{
Expand All @@ -56,13 +86,18 @@ In order to use this module with the Expo CLI you can make use of our integrated
"react-native-imglysdk",
{
"android": {
"version": "9.2.0",
"version": "10.4.1",
"modules": [
"ui:core",
"ui:transform",
"ui:filter",
"assets:filter-basic"
]
],
"buildToolsVersion": "31.0.0",
"minSdkVersion": "21",
"compileSdkVersion": "31",
"targetSdkVersion": "30",
"kotlinGradlePluginVersion": "1.5.32"
}
}
]
Expand All @@ -71,10 +106,12 @@ In order to use this module with the Expo CLI you can make use of our integrated
```

For further information on the available modules, please refer to step 4 of the React Native CLI [Android](#android) guide below.

**Please note that the `react-native-imglysdk` module manages both VideoEditor SDK as well as PhotoEditor SDK so you only need to add the Expo config plugin once even when using both SDKs.**

3. The changes will be applied on `expo prebuild` or during the prebuild phase of `eas build`.
3. From version `2.15.0` the iOS deployment target needs to be set to at least iOS 13. You can use the `expo-build-properties` config plugin for this. Please refer to the [official Expo docs](https://docs.expo.dev/versions/v45.0.0/sdk/build-properties/).

4. The changes will be applied on `expo prebuild` or during the prebuild phase of `eas build`.

For further information on how to integrate Expo config plugins please also refer to the official [docs](https://docs.expo.dev/guides/config-plugins/#using-a-plugin-in-your-app).

Expand Down Expand Up @@ -114,40 +151,24 @@ For older React Native versions autolinking is not available and VideoEditor SDK

#### Android

1. Because VideoEditor SDK for Android is quite large, there is a high chance that you will need to enable [Multidex](https://developer.android.com/studio/build/multidex) for your project as follows:

1. Open the `android/app/build.gradle` file (**not** `android/build.gradle`) and add these lines at the end:
```groovy
android {
defaultConfig {
multiDexEnabled true
}
}
dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
}
```
2. Open the `android/app/src/main/java/.../MainApplication.java` file and change the superclass of your `MainApplication` class from `Application` to `androidx.multidex.MultiDexApplication`, e.g.:
```java
public class MainApplication extends androidx.multidex.MultiDexApplication implements ReactApplication {
```

2. Add the img.ly repository and plugin by opening the `android/build.gradle` file (**not** `android/app/build.gradle`) and adding these lines at the top:
1. Add the img.ly repository and plugin by opening the `android/build.gradle` file (**not** `android/app/build.gradle`) and adding these lines at the top:

```groovy
buildscript {
repositories {
mavenCentral()
maven { url "https://artifactory.img.ly/artifactory/imgly" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10"
classpath 'ly.img.android.sdk:plugin:9.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.32"
classpath 'ly.img.android.sdk:plugin:10.4.1'
}
}
```
In order to update VideoEditor SDK for Android replace the version string `9.2.0` with a [newer release](https://github.com/imgly/vesdk-android-demo/releases).

3. Still in the `android/build.gradle` file (**not** `android/app/build.gradle`), add these lines at the bottom:
In order to update VideoEditor SDK for Android replace the version string `10.4.1` with a [newer release](https://github.com/imgly/vesdk-android-demo/releases).

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

```groovy
allprojects {
Expand All @@ -157,7 +178,24 @@ For older React Native versions autolinking is not available and VideoEditor SDK
}
```

4. Configure VideoEditor SDK for Android by opening the `android/app/build.gradle` file (**not** `android/build.gradle`) and adding the following lines under `apply plugin: "com.android.application"`:
3. In the same file, you will need to modify the `minSdkVersion` to at least `21`. We also recommend to update the `buildToolsVersion` to `31.0.0` or higher as well as the `compileSdkVersion` to `31` or higher:

```diff
buildscript {
ext {
- buildToolsVersion = "30.0.2"
+ buildToolsVersion = "31.0.0"
- minSdkVersion = 19
+ minSdkVersion = 21
- compileSdkVersion = 30
+ compileSdkVersion = 31
targetSdkVersion = 30
}
}
```

4. Configure VideoEditor SDK for Android by opening the `android/app/build.gradle` file (**not** `android/build.gradle`) and adding the following lines under `apply plugin: "com.android.application"`:

```groovy
apply plugin: 'ly.img.android.sdk'
apply plugin: 'kotlin-android'
Expand All @@ -179,6 +217,7 @@ For older React Native versions autolinking is not available and VideoEditor SDK
include 'ui:video-library'
include 'ui:video-composition'
include 'ui:audio-composition'
include 'ui:giphy-sticker'

// This module is big, remove the serializer if you don't need that feature.
include 'backend:serializer'
Expand All @@ -194,6 +233,7 @@ For older React Native versions autolinking is not available and VideoEditor SDK

include 'backend:sticker-animated'
include 'backend:sticker-smart'
include 'backend:background-removal'
}
}
```
Expand All @@ -203,25 +243,29 @@ For older React Native versions autolinking is not available and VideoEditor SDK
Import the module in your `App.js`:

```js
import {VESDK, VideoEditorModal, Configuration} from 'react-native-videoeditorsdk';
import {
VESDK,
VideoEditorModal,
Configuration,
} from "react-native-videoeditorsdk";
```

Each platform requires a separate license file. [Unlock VideoEditor SDK](./index.d.ts#L41-L53) automatically for both platforms with a single line of code via [platform-specific file extensions](https://reactnative.dev/docs/platform-specific-code#platform-specific-extensions):

```js
VESDK.unlockWithLicense(require('./vesdk_license'));
VESDK.unlockWithLicense(require("./vesdk_license"));
```

Open the editor with a video:

```js
VESDK.openEditor(require('./video.mp4'));
VESDK.openEditor(require("./video.mp4"));
```

Or use the component to open the editor:

```jsx
<VideoEditorModal visible={true} video={require('./video.mp4')}/>
<VideoEditorModal visible={true} video={require("./video.mp4")} />
```

Please see the [code documentation](./index.d.ts) for more details and additional [customization and configuration options](./configuration.ts).
Expand Down
4 changes: 2 additions & 2 deletions RNVideoEditorSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Pod::Spec.new do |s|
s.homepage = package['homepage']
s.license = { :type => package['license'], :file => package['licenseFilename'] }
s.author = { package['author']['name'] => package['author']['email'] }
s.platform = :ios, '9.0'
s.platform = :ios, '13.0'
s.source = { :git => package['repository']['url'], :tag => "#{s.version}" }
s.source_files = 'ios/**/*.{h,m,swift}'
s.public_header_files = ['ios/RNVideoEditorSDK.h', 'ios/RNImglyKit.h']
s.requires_arc = true

s.dependency 'React'
s.dependency 'React-RCTImage'
s.dependency 'VideoEditorSDK', '~> 10.29'
s.dependency 'VideoEditorSDK', '~> 11.4'
end
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ imglyConfig {
}
}

def MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION = "9.2.0"
def MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION = "10.4.1"

task checkVersion {
if (imglyConfig.convertToVersionNumber(imglyConfig.getVersion()) < imglyConfig.convertToVersionNumber(MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION)) {
Expand All @@ -39,11 +39,11 @@ task checkVersion {
preBuild.dependsOn checkVersion

android {
compileSdkVersion safeExtGet('compileSdkVersion', 30)
buildToolsVersion safeExtGet('buildToolsVersion', '30.0.3')
compileSdkVersion safeExtGet('compileSdkVersion', 31)
buildToolsVersion safeExtGet('buildToolsVersion', '31.0.0')

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 19)
minSdkVersion safeExtGet('minSdkVersion', 21)
targetSdkVersion safeExtGet('targetSdkVersion', 30)
versionCode 1
versionName "1.0"
Expand Down
1 change: 1 addition & 0 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
android:exported="false"
android:enabled="false"
android:name="ly.img.android.IMGLYAutoInit" />
<activity android:name=".RNVideoEditorSDKActivity" />
</application>
</manifest>

Loading