react-native-video-trim 1.0.15 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,7 +22,7 @@ npx pod-install ios
22
22
  ```
23
23
 
24
24
  ## Usage
25
- > Note that for iOS you have to try on real device
25
+ **Note that for both Android and iOS you have to try on real device**
26
26
 
27
27
  ```js
28
28
  import { showEditor } from 'react-native-video-trim';
@@ -31,7 +31,7 @@ public class VideoTrimmerUtil {
31
31
  private static final int THUMB_RESOLUTION_RES = 2; // double thumb resolution for better quality
32
32
 
33
33
  public static void trim(String inputFile, String outputFile, int videoDuration, long startMs, long endMs, final VideoTrimListener callback) {
34
- String cmd = "-i " + inputFile + " -ss " + startMs + "ms" + " -to " + endMs + "ms -c copy " + outputFile;
34
+ String cmd = "-ss " + startMs + "ms" + " -to " + endMs + "ms -i " + inputFile + " -c copy " + outputFile;
35
35
  callback.onStartTrim();
36
36
  FFmpegKit.executeAsync(cmd, session -> {
37
37
  SessionState state = session.getState();
@@ -279,7 +279,7 @@ class VideoTrim: RCTEventEmitter {
279
279
  let timestamp = Int(Date().timeIntervalSince1970)
280
280
  let outputName = "\(FILE_PREFIX)_\(timestamp).mp4" // use mp4 to prevent any issue with ffmpeg about file extension
281
281
  let outputFile = "\(inputFile.deletingLastPathComponent().absoluteURL)\(outputName)"
282
- let cmd = "-i \(inputFile) -ss \(startTime * 1000)ms -to \(endTime * 1000)ms -c copy \(outputFile)";
282
+ let cmd = "-ss \(startTime * 1000)ms -to \(endTime * 1000)ms -i \(inputFile) -c copy \(outputFile)";
283
283
 
284
284
  self.emitEventToJS("onStartTrimming", eventData: nil)
285
285
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-video-trim",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Video trimmer for your React Native app",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",