react-native-video-trim 1.0.20 → 1.0.21

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.
@@ -275,7 +275,13 @@ class VideoTrim: RCTEventEmitter {
275
275
  let timestamp = Int(Date().timeIntervalSince1970)
276
276
  let outputName = "\(FILE_PREFIX)_\(timestamp).mp4" // use mp4 to prevent any issue with ffmpeg about file extension
277
277
  let outputFile = "\(inputFile.deletingLastPathComponent().absoluteURL)\(outputName)"
278
- let cmd = "-ss \(startTime * 1000)ms -to \(endTime * 1000)ms -i \(inputFile) -c copy \(outputFile)";
278
+
279
+ let formatter = DateFormatter()
280
+ formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ"
281
+ formatter.timeZone = TimeZone(identifier: "UTC")
282
+ let dateTime = formatter.string(from: Date())
283
+
284
+ let cmd = "-ss \(startTime * 1000)ms -to \(endTime * 1000)ms -i \(inputFile) -c copy -metadata creation_time=\(dateTime) \(outputFile)";
279
285
 
280
286
  self.emitEventToJS("onStartTrimming", eventData: nil)
281
287
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-video-trim",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "Video trimmer for your React Native app",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",