react-native-compressor 1.5.1 → 1.5.2

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.
@@ -400,17 +400,8 @@ func makeValidUri(filePath: String) -> String {
400
400
  }
401
401
 
402
402
  func getVideoTrack(asset: AVAsset) -> AVAssetTrack {
403
- var videoTrackIndex: Int = 0;
404
- let trackLength = asset.tracks.count;
405
- if(trackLength==2)
406
- {
407
- if(asset.tracks[0].mediaType.rawValue=="soun")
408
- {
409
- videoTrackIndex=1;
410
- }
411
- }
412
- let track = asset.tracks[videoTrackIndex];
413
- return track;
403
+ let tracks = asset.tracks(withMediaType: AVMediaType.video)
404
+ return tracks[0];
414
405
  }
415
406
 
416
407
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-compressor",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "This library compress image, video and audio",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
File without changes