react-native-compressor 1.6.2 → 1.6.3

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,10 +1,20 @@
1
1
  <div align="center">
2
- <h1 align="center">🗜️Compress Image, Video, and Audio same like Whatsapp <img height="30" src="/media/whatsapp_logo.png"></h1>
2
+ <img height="150" src="/media/logo.png"></h2>
3
3
  </div>
4
+ <br/>
4
5
 
5
- ### Why should we use react-native-compress over [FFmpeg](https://www.ffmpeg.org/)?
6
+ **REACT-NATIVE-COMPRESSOR** is a react-native package, which help us to Compress `Image`, `Video`, and `Audio` same like **Whatsapp** without knowing compression `algorithm`
6
7
 
7
- We should use **react-native-compressor** instead of **FFmpeg** because **react-native-compressor** gives you same compression **Whatsapp** (`Image, Video, and Audio`) without knowing the algorithm of compression + it is lightweight only increase **50 KB Size** Size in APK. While in **FFmpeg**, we have to give manual image/video/Audo size and quality as well as **FFmpeg** increase ~> **9 MB Size** in **APK**
8
+ <div align="center">
9
+ <img height="60" src="/media/whatsapp_logo.png">
10
+ <h2 align="center">🗜️Compress Image, Video, and Audio same like Whatsapp</h2>
11
+ </div>
12
+
13
+ #### Why should we use react-native-compress over [FFmpeg](https://www.ffmpeg.org/)?
14
+
15
+ We should use **react-native-compressor** instead of **FFmpeg** because **react-native-compressor** gives you same compression of **Whatsapp** (`Image, Video, and Audio`) without knowing the algorithm of compression + it is lightweight only increase **50 KB Size** Size in APK while **FFmpeg** increase ~> **9 MB Size** in **APK**, and we have to give manual image/video/Audo size and quality as well as
16
+
17
+ **If you find this package useful hit the star** 🌟
8
18
 
9
19
  ### Would you like to support me?
10
20
 
@@ -22,23 +32,7 @@ We should use **react-native-compressor** instead of **FFmpeg** because **react-
22
32
 
23
33
  ---
24
34
 
25
- <!-- Header -->
26
-
27
- <p align="center">
28
- <h1>Banchmark between <img height="50" src="/media/whatsapp_logo.png"> VS REACT-NATIVE-COMPRESSOR</h1>
29
- <br />
30
- </p>
31
-
32
-
33
- <p align="center">
34
- <img height="450" src="/media/branchmark_for_images.png">
35
- <br /> <br />
36
- <img height="450" src="/media/benchmark_for_videos.png">
37
- </p>
38
-
39
- **react-native-compressor** package is a set of functions that allow you compress `Image`,`Audio` and `Video`
40
-
41
- **If you find this package useful hit the star** 🌟
35
+ #### See the [Benchmarks](#benchmark)
42
36
 
43
37
  # Table of Contents
44
38
 
@@ -429,6 +423,16 @@ const randomFilePathForSaveFile = await generateFilePath('mp4'); // file://fil
429
423
 
430
424
  - ##### `generateFilePath(fileextension: string)`
431
425
 
426
+ ## Benchmark
427
+
428
+ [<img height="30" src="/media/whatsapp_logo.png"> Whatsapp:](https://apps.apple.com/us/app/whatsapp-messenger/id310633997) compresses Images,Videos and Audios in every effect way
429
+
430
+ <p align="center">
431
+ <img height="450" src="/media/branchmark_for_images.png">
432
+ <br /> <br />
433
+ <img height="450" src="/media/benchmark_for_videos.png">
434
+ </p>
435
+
432
436
  ## Contributing
433
437
 
434
438
  See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
@@ -407,7 +407,7 @@ public class AudioCompressor {
407
407
  return -1;
408
408
  }
409
409
 
410
-
410
+ @SuppressLint("WrongConstant")
411
411
  @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
412
412
  private long writeAudioTrack(MediaExtractor extractor, MediaMuxer mediaMuxer, MediaCodec.BufferInfo info, File file, int muxerTrackIndex ) throws Exception {
413
413
  int trackIndex = selectTrack(extractor, true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-compressor",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "This library compress image, video and audio",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",