react-native-compressor 1.6.2 → 1.6.4

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,30 @@
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
+ <div align="center">
7
+
8
+ [![GitHub Repo stars](https://img.shields.io/static/v1?style=for-the-badge&message=Discord&color=5865F2&logo=Discord&logoColor=FFFFFF&label=)](https://discord.gg/dtYzk8sp)
9
+ [![GitHub Repo stars](https://img.shields.io/github/stars/numandev1/react-native-compressor?style=for-the-badge&logo=github)](https://github.com/numandev1/react-native-compressor/stargazers)
10
+ [![GitHub Repo stars](https://img.shields.io/npm/v/react-native-compressor?style=for-the-badge&message=npm&&color=CB3837&logo=npm&logoColor=FFFFFF&label=)](https://www.npmjs.com/package/react-native-compressor)
11
+ ![npm](https://img.shields.io/static/v1?style=for-the-badge&message=TypeScript&color=3178C6&logo=TypeScript&logoColor=FFFFFF&label=)
12
+ ![npm](https://img.shields.io/npm/dt/react-native-compressor?style=for-the-badge)
13
+
14
+ </div>
15
+
16
+ **REACT-NATIVE-COMPRESSOR** is a react-native package, which help us to Compress `Image`, `Video`, and `Audio` same like **Whatsapp** without knowing compression `algorithm`
17
+
18
+ <div align="center">
19
+ <img height="60" src="/media/whatsapp_logo.png">
20
+ <h2 align="center">🗜️Compress Image, Video, and Audio same like Whatsapp</h2>
21
+ </div>
6
22
 
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**
23
+ #### Why should we use react-native-compress over [FFmpeg](https://www.ffmpeg.org/)?
24
+
25
+ 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
26
+
27
+ **If you find this package useful hit the star** 🌟
8
28
 
9
29
  ### Would you like to support me?
10
30
 
@@ -22,23 +42,7 @@ We should use **react-native-compressor** instead of **FFmpeg** because **react-
22
42
 
23
43
  ---
24
44
 
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** 🌟
45
+ #### See the [Benchmarks](#benchmark)
42
46
 
43
47
  # Table of Contents
44
48
 
@@ -429,6 +433,16 @@ const randomFilePathForSaveFile = await generateFilePath('mp4'); // file://fil
429
433
 
430
434
  - ##### `generateFilePath(fileextension: string)`
431
435
 
436
+ ## Benchmark
437
+
438
+ [<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
439
+
440
+ <p align="center">
441
+ <img height="450" src="/media/branchmark_for_images.png">
442
+ <br /> <br />
443
+ <img height="450" src="/media/benchmark_for_videos.png">
444
+ </p>
445
+
432
446
  ## Contributing
433
447
 
434
448
  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.4",
4
4
  "description": "This library compress image, video and audio",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",