release v4.5.1 for react-native

This commit is contained in:
Taner Sener 2022-01-02 11:23:41 +00:00
parent eaa0b91758
commit b02d3440c3
2 changed files with 14 additions and 15 deletions

View File

@ -196,7 +196,7 @@ compare to each other.
```js
import { FFmpegKit } from 'ffmpeg-kit-react-native';
FFmpegKit.executeAsync('-i file1.mp4 -c:v mpeg4 file2.mp4', async (session) => {
FFmpegKit.execute('-i file1.mp4 -c:v mpeg4 file2.mp4').then(async (session) => {
const returnCode = await session.getReturnCode();
if (ReturnCode.isSuccess(returnCode)) {
@ -219,7 +219,7 @@ compare to each other.
session created.
```js
FFmpegKit.executeAsync('-i file1.mp4 -c:v mpeg4 file2.mp4').then(async (session) => {
FFmpegKit.execute('-i file1.mp4 -c:v mpeg4 file2.mp4').then(async (session) => {
// Unique session id created for this execution
const sessionId = session.getSessionId();
@ -276,7 +276,7 @@ compare to each other.
4. Execute `FFprobe` commands.
```js
FFprobeKit.executeAsync(ffprobeCommand, session => {
FFprobeKit.execute(ffprobeCommand).then(async (session) => {
// CALLED WHEN SESSION IS EXECUTED
@ -286,8 +286,18 @@ compare to each other.
5. Get media information for a file/url.
```js
FFprobeKit.getMediaInformationAsync('<file path or url>', async (session) => {
FFprobeKit.getMediaInformation(testUrl).then(async (session) => {
const information = await session.getMediaInformation();
if (information === undefined) {
// CHECK THE FOLLOWING ATTRIBUTES ON ERROR
const state = FFmpegKitConfig.sessionStateToString(await session.getState());
const returnCode = await session.getReturnCode();
const failStackTrace = await session.getFailStackTrace();
const duration = await session.getDuration();
const output = await session.getOutput();
}
});
```

View File

@ -6,17 +6,6 @@
"types": "src/index.d.ts",
"react-native": "src/index",
"source": "src/index",
"files": [
"android",
"ffmpeg-kit-react-native.podspec",
"ios",
"src",
"!android/build",
"!ios/build",
"!**/__tests__",
"!**/__fixtures__",
"!**/__mocks__"
],
"scripts": {
"test": "jest",
"lint": "eslint \"**/*.{js,ts,tsx}\"",