react-native-compressor 1.1.0 → 1.1.1

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
@@ -1,3 +1,9 @@
1
+ ### Would you like to support me?
2
+
3
+ <a href="https://www.buymeacoffee.com/numan.dev" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>
4
+
5
+ ---
6
+
1
7
  # react-native-compressor
2
8
 
3
9
  <!-- Title -->
@@ -245,8 +245,8 @@ func makeValidUri(filePath: String) -> String {
245
245
  let compressFactor:Float = 0.8
246
246
  let minCompressFactor:Float = 0.8
247
247
  let maxBitrate:Int = 1669000
248
-
249
- var remeasuredBitrate:Int = originalBitrate / (min(originalHeight/height,originalWidth/width))
248
+ let minValue:Float=min(Float(originalHeight)/Float(height),Float(originalWidth)/Float(width))
249
+ var remeasuredBitrate:Int = Int(Float(originalBitrate) / minValue)
250
250
  remeasuredBitrate = remeasuredBitrate*Int(compressFactor)
251
251
  let minBitrate:Int = self.getVideoBitrateWithFactor(f: minCompressFactor) / (1280 * 720 / (width * height))
252
252
  if (originalBitrate < minBitrate) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-compressor",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "This library compress image, video and audio",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",