Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Commit b3379ce

Browse files
committed
release react-native plugin v5.1.0
1 parent 80dc3ae commit b3379ce

File tree

11 files changed

+69
-68
lines changed

11 files changed

+69
-68
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Please also include the context and motivation about the changes introduced.
88
- Documentation
99

1010
## Checks
11-
- [ ] Changes support all platforms (`Android`, `iOS`, `Linux`, macOS`, `tvOS`)
11+
- [ ] Changes support all platforms (`Android`, `iOS`, `Linux`, `macOS`, `tvOS`)
1212
- [ ] Breaks existing functionality
1313
- [ ] Implementation is completed, not half-done
1414
- [ ] Is there another PR already created for this feature/bug fix

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,12 @@ the same `FFmpeg` release branch.
124124
`dev` part in the version string indicates that `FFmpeg` source code is cloned from the `FFmpeg` `master` branch and
125125
the exact version number of `FFmpeg` is obtained using the `git describe --tags` command.
126126

127-
| Platforms | FFmpegKit Version | FFmpeg Version | Release Date |
128-
|:----------------:|:----------------------------------------------------------------------------------:|:--------------:|:------------:|
127+
| Platforms | FFmpegKit Version | FFmpeg Version | Release Date |
128+
|:----------------:|:---------------------------------------------------------------------------------:|:--------------:|:------------:|
129+
| React Native | [5.1.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v5.1.0) | 5.1.2 | Oct 02, 2022 |
129130
| Flutter | [5.1.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v5.1.0) | 5.1.2 | Oct 02, 2022 |
130131
| Android | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 |
131-
| Apple | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 |
132+
| Apple | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 |
132133
| React Native | [4.5.2](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v4.5.2) | 4.5-dev-3393 | May 25, 2022 |
133134
| Flutter | [4.5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v4.5.1) | 4.5-dev-3393 | Jan 02, 2022 |
134135
| React Native | [4.5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v4.5.1) | 4.5-dev-3393 | Jan 02, 2022 |

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ the exact version number of `FFmpeg` is obtained using the `git describe --tags`
114114

115115
| Platforms | FFmpegKit Version | FFmpeg Version | Release Date |
116116
|:----------------:|:---------------------------------------------------------------------------------:|:--------------:|:------------:|
117+
| React Native | [5.1.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v5.1.0) | 5.1.2 | Oct 02, 2022 |
117118
| Flutter | [5.1.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v5.1.0) | 5.1.2 | Oct 02, 2022 |
118119
| Android | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 |
119120
| Apple | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 |

react-native/README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
- Includes both `FFmpeg` and `FFprobe`
55
- Supports
66
- Both `Android` and `iOS`
7-
- FFmpeg `v4.5-dev` releases
7+
- FFmpeg `v5.1.2`
88
- `arm-v7a`, `arm-v7a-neon`, `arm64-v8a`, `x86` and `x86_64` architectures on Android
9-
- `Android API Level 16` or later
9+
- `Android API Level 24` or later
10+
- `API Level 16` on LTS releases
1011
- `armv7`, `armv7s`, `arm64`, `arm64-simulator`, `i386`, `x86_64`, `x86_64-mac-catalyst` and `arm64-mac-catalyst` architectures on iOS
11-
- `iOS SDK 10` or later
12+
- `iOS SDK 12.1` or later
13+
- `iOS SDK 10` on LTS releases
1214
- Can process Storage Access Framework (SAF) Uris on Android
1315
- 25 external libraries
1416

@@ -22,7 +24,7 @@
2224
- `bzip2`, `iconv`, `libuuid`, `zlib` system libraries and `AudioToolbox`, `VideoToolbox`, `AVFoundation` system frameworks on iOS
2325

2426
- Includes Typescript definitions
25-
- Licensed under LGPL 3.0, can be customized to support GPL v3.0
27+
- Licensed under `LGPL 3.0` by default, some packages licensed by `GPL v3.0` effectively
2628

2729
### 2. Installation
2830

@@ -32,16 +34,16 @@ yarn add ffmpeg-kit-react-native
3234

3335
#### 2.1 Packages
3436

35-
`ffmpeg` includes built-in encoders for some popular formats. However, there are certain external libraries that needs
37+
`FFmpeg` includes built-in encoders for some popular formats. However, there are certain external libraries that needs
3638
to be enabled in order to encode specific formats/codecs. For example, to encode an `mp3` file you need `lame` or
3739
`shine` library enabled. You have to install a `ffmpeg-kit-react-native` package that has at least one of them inside.
3840
To encode an `h264` video, you need to install a package with `x264` inside. To encode `vp8` or `vp9` videos, you need
3941
a `ffmpeg-kit-react-native` package with `libvpx` inside.
4042

41-
`ffmpeg-kit` provides eight packages that include different sets of external libraries. These packages are
42-
named according to the external libraries included in them. Refer to
43-
[Packages](https://github.com/arthenica/ffmpeg-kit#9-packages) section of the project README to see the names
44-
of those packages and external libraries included in each of them.
43+
`ffmpeg-kit` provides eight packages that include different sets of external libraries. These packages are named
44+
according to the external libraries included. Refer to the
45+
[Packages](https://github.com/arthenica/ffmpeg-kit/wiki/Packages) wiki page to see the names of those
46+
packages and external libraries included in each one of them.
4547

4648
##### 2.1.1 Package Names
4749

@@ -184,10 +186,10 @@ the package name you are using.
184186
185187
#### 2.4 LTS Releases
186188
187-
`ffmpeg-kit-react-native` is published in two different variants: `Main Release` and `LTS Release`. Both releases
188-
share the same source code but is built with different settings (Architectures, API Level, iOS Min SDK, etc.). Refer to
189-
[LTS Releases](https://github.com/arthenica/ffmpeg-kit#11-lts-releases) section of the project README to see how they
190-
compare to each other.
189+
`ffmpeg-kit-react-native` is published in two variants: `Main Release` and `LTS Release`. Both releases share the
190+
same source code but is built with different settings (Architectures, API Level, iOS Min SDK, etc.). Refer to the
191+
[LTS Releases](https://github.com/arthenica/ffmpeg-kit/wiki/LTS-Releases) wiki page to see how they differ from each
192+
other.
191193
192194
### 3. Using
193195

react-native/android/build.gradle

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
22
repositories {
33
google()
4-
jcenter()
4+
mavenCentral()
55
}
66

77
dependencies {
8-
classpath 'com.android.tools.build:gradle:4.2.2'
8+
classpath 'com.android.tools.build:gradle:7.3.0'
99
}
1010
}
1111

@@ -26,13 +26,13 @@ def safeExtGet(String prop, String fallback) {
2626
}
2727

2828
android {
29-
compileSdkVersion 30
29+
compileSdkVersion 31
3030

3131
defaultConfig {
3232
minSdkVersion safeExtGet('ffmpegKitPackage', 'https').contains("-lts") ? 16 : 24
33-
targetSdkVersion 30
34-
versionCode 452
35-
versionName "4.5.2"
33+
targetSdkVersion 31
34+
versionCode 510
35+
versionName "5.1.0"
3636
}
3737

3838
buildTypes {
@@ -44,14 +44,13 @@ android {
4444
disable 'GradleCompatible'
4545
}
4646
compileOptions {
47-
sourceCompatibility JavaVersion.VERSION_1_8
48-
targetCompatibility JavaVersion.VERSION_1_8
47+
sourceCompatibility JavaVersion.VERSION_11
48+
targetCompatibility JavaVersion.VERSION_11
4949
}
5050
}
5151

5252
repositories {
5353
mavenCentral()
54-
jcenter()
5554
google()
5655

5756
def found = false
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
android.useAndroidX=true
2-
ffmpegKit.android.main.version=4.5.1-1
3-
ffmpegKit.android.lts.version=4.5.1-1
2+
ffmpegKit.android.main.version=5.1
3+
ffmpegKit.android.lts.version=5.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

react-native/ffmpeg-kit-react-native.podspec

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,112 +23,112 @@ Pod::Spec.new do |s|
2323
s.subspec 'min' do |ss|
2424
ss.source_files = '**/FFmpegKitReactNativeModule.m',
2525
'**/FFmpegKitReactNativeModule.h'
26-
ss.dependency 'ffmpeg-kit-ios-min', "4.5.1"
26+
ss.dependency 'ffmpeg-kit-ios-min', "5.1"
2727
ss.ios.deployment_target = '12.1'
2828
end
2929

3030
s.subspec 'min-lts' do |ss|
3131
ss.source_files = '**/FFmpegKitReactNativeModule.m',
3232
'**/FFmpegKitReactNativeModule.h'
33-
ss.dependency 'ffmpeg-kit-ios-min', "4.5.1.LTS"
33+
ss.dependency 'ffmpeg-kit-ios-min', "5.1.LTS"
3434
ss.ios.deployment_target = '10'
3535
end
3636

3737
s.subspec 'min-gpl' do |ss|
3838
ss.source_files = '**/FFmpegKitReactNativeModule.m',
3939
'**/FFmpegKitReactNativeModule.h'
40-
ss.dependency 'ffmpeg-kit-ios-min-gpl', "4.5.1"
40+
ss.dependency 'ffmpeg-kit-ios-min-gpl', "5.1"
4141
ss.ios.deployment_target = '12.1'
4242
end
4343

4444
s.subspec 'min-gpl-lts' do |ss|
4545
ss.source_files = '**/FFmpegKitReactNativeModule.m',
4646
'**/FFmpegKitReactNativeModule.h'
47-
ss.dependency 'ffmpeg-kit-ios-min-gpl', "4.5.1.LTS"
47+
ss.dependency 'ffmpeg-kit-ios-min-gpl', "5.1.LTS"
4848
ss.ios.deployment_target = '10'
4949
end
5050

5151
s.subspec 'https' do |ss|
5252
ss.source_files = '**/FFmpegKitReactNativeModule.m',
5353
'**/FFmpegKitReactNativeModule.h'
54-
ss.dependency 'ffmpeg-kit-ios-https', "4.5.1"
54+
ss.dependency 'ffmpeg-kit-ios-https', "5.1"
5555
ss.ios.deployment_target = '12.1'
5656
end
5757

5858
s.subspec 'https-lts' do |ss|
5959
ss.source_files = '**/FFmpegKitReactNativeModule.m',
6060
'**/FFmpegKitReactNativeModule.h'
61-
ss.dependency 'ffmpeg-kit-ios-https', "4.5.1.LTS"
61+
ss.dependency 'ffmpeg-kit-ios-https', "5.1.LTS"
6262
ss.ios.deployment_target = '10'
6363
end
6464

6565
s.subspec 'https-gpl' do |ss|
6666
ss.source_files = '**/FFmpegKitReactNativeModule.m',
6767
'**/FFmpegKitReactNativeModule.h'
68-
ss.dependency 'ffmpeg-kit-ios-https-gpl', "4.5.1"
68+
ss.dependency 'ffmpeg-kit-ios-https-gpl', "5.1"
6969
ss.ios.deployment_target = '12.1'
7070
end
7171

7272
s.subspec 'https-gpl-lts' do |ss|
7373
ss.source_files = '**/FFmpegKitReactNativeModule.m',
7474
'**/FFmpegKitReactNativeModule.h'
75-
ss.dependency 'ffmpeg-kit-ios-https-gpl', "4.5.1.LTS"
75+
ss.dependency 'ffmpeg-kit-ios-https-gpl', "5.1.LTS"
7676
ss.ios.deployment_target = '10'
7777
end
7878

7979
s.subspec 'audio' do |ss|
8080
ss.source_files = '**/FFmpegKitReactNativeModule.m',
8181
'**/FFmpegKitReactNativeModule.h'
82-
ss.dependency 'ffmpeg-kit-ios-audio', "4.5.1"
82+
ss.dependency 'ffmpeg-kit-ios-audio', "5.1"
8383
ss.ios.deployment_target = '12.1'
8484
end
8585

8686
s.subspec 'audio-lts' do |ss|
8787
ss.source_files = '**/FFmpegKitReactNativeModule.m',
8888
'**/FFmpegKitReactNativeModule.h'
89-
ss.dependency 'ffmpeg-kit-ios-audio', "4.5.1.LTS"
89+
ss.dependency 'ffmpeg-kit-ios-audio', "5.1.LTS"
9090
ss.ios.deployment_target = '10'
9191
end
9292

9393
s.subspec 'video' do |ss|
9494
ss.source_files = '**/FFmpegKitReactNativeModule.m',
9595
'**/FFmpegKitReactNativeModule.h'
96-
ss.dependency 'ffmpeg-kit-ios-video', "4.5.1"
96+
ss.dependency 'ffmpeg-kit-ios-video', "5.1"
9797
ss.ios.deployment_target = '12.1'
9898
end
9999

100100
s.subspec 'video-lts' do |ss|
101101
ss.source_files = '**/FFmpegKitReactNativeModule.m',
102102
'**/FFmpegKitReactNativeModule.h'
103-
ss.dependency 'ffmpeg-kit-ios-video', "4.5.1.LTS"
103+
ss.dependency 'ffmpeg-kit-ios-video', "5.1.LTS"
104104
ss.ios.deployment_target = '10'
105105
end
106106

107107
s.subspec 'full' do |ss|
108108
ss.source_files = '**/FFmpegKitReactNativeModule.m',
109109
'**/FFmpegKitReactNativeModule.h'
110-
ss.dependency 'ffmpeg-kit-ios-full', "4.5.1"
110+
ss.dependency 'ffmpeg-kit-ios-full', "5.1"
111111
ss.ios.deployment_target = '12.1'
112112
end
113113

114114
s.subspec 'full-lts' do |ss|
115115
ss.source_files = '**/FFmpegKitReactNativeModule.m',
116116
'**/FFmpegKitReactNativeModule.h'
117-
ss.dependency 'ffmpeg-kit-ios-full', "4.5.1.LTS"
117+
ss.dependency 'ffmpeg-kit-ios-full', "5.1.LTS"
118118
ss.ios.deployment_target = '10'
119119
end
120120

121121
s.subspec 'full-gpl' do |ss|
122122
ss.source_files = '**/FFmpegKitReactNativeModule.m',
123123
'**/FFmpegKitReactNativeModule.h'
124-
ss.dependency 'ffmpeg-kit-ios-full-gpl', "4.5.1"
124+
ss.dependency 'ffmpeg-kit-ios-full-gpl', "5.1"
125125
ss.ios.deployment_target = '12.1'
126126
end
127127

128128
s.subspec 'full-gpl-lts' do |ss|
129129
ss.source_files = '**/FFmpegKitReactNativeModule.m',
130130
'**/FFmpegKitReactNativeModule.h'
131-
ss.dependency 'ffmpeg-kit-ios-full-gpl', "4.5.1.LTS"
131+
ss.dependency 'ffmpeg-kit-ios-full-gpl', "5.1.LTS"
132132
ss.ios.deployment_target = '10'
133133
end
134134

react-native/ios/FFmpegKitReactNativeModule.m

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,23 +299,21 @@ - (void)registerGlobalCallbacks {
299299
// MediaInformationJsonParser
300300

301301
RCT_EXPORT_METHOD(mediaInformationJsonParserFrom:(NSString*)ffprobeJsonOutput resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
302-
NSError *error;
303-
MediaInformation* mediaInformation = [MediaInformationJsonParser from:ffprobeJsonOutput with:error];
304-
if (error == nil) {
302+
@try {
303+
MediaInformation* mediaInformation = [MediaInformationJsonParser fromWithError:ffprobeJsonOutput];
305304
resolve([FFmpegKitReactNativeModule toMediaInformationDictionary:mediaInformation]);
306-
} else {
307-
NSLog(@"MediaInformation parsing failed: %@.\n", error);
305+
} @catch (NSException *exception) {
306+
NSLog(@"Parsing MediaInformation failed: %@.\n", [NSString stringWithFormat:@"%@\n%@", [exception userInfo], [exception callStackSymbols]]);
308307
resolve(nil);
309308
}
310309
}
311310

312311
RCT_EXPORT_METHOD(mediaInformationJsonParserFromWithError:(NSString*)ffprobeJsonOutput resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
313-
NSError *error;
314-
MediaInformation* mediaInformation = [MediaInformationJsonParser from:ffprobeJsonOutput with:error];
315-
if (error == nil) {
312+
@try {
313+
MediaInformation* mediaInformation = [MediaInformationJsonParser fromWithError:ffprobeJsonOutput];
316314
resolve([FFmpegKitReactNativeModule toMediaInformationDictionary:mediaInformation]);
317-
} else {
318-
NSLog(@"MediaInformation parsing failed: %@.\n", error);
315+
} @catch (NSException *exception) {
316+
NSLog(@"Parsing MediaInformation failed: %@.\n", [NSString stringWithFormat:@"%@\n%@", [exception userInfo], [exception callStackSymbols]]);
319317
reject(@"PARSE_FAILED", @"Parsing MediaInformation failed with JSON error.", nil);
320318
}
321319
}

react-native/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ffmpeg-kit-react-native",
3-
"version": "4.5.2",
3+
"version": "5.1.0",
44
"description": "FFmpeg Kit for React Native",
55
"main": "src/index",
66
"types": "src/index.d.ts",
@@ -19,7 +19,7 @@
1919
"ios"
2020
],
2121
"repository": "https://github.com/arthenica/ffmpeg-kit",
22-
"author": "ARTHENICA <[email protected]> (https://github.com/arthenica)",
22+
"author": "ARTHENICA <[email protected]> (https://www.arthenica.com)",
2323
"license": "LGPL-3.0",
2424
"bugs": {
2525
"url": "https://github.com/arthenica/ffmpeg-kit/issues"

0 commit comments

Comments
 (0)