File tree Expand file tree Collapse file tree 5 files changed +26
-4
lines changed
Expand file tree Collapse file tree 5 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 1+ # These are supported funding model platforms
2+
3+ github : nomi9995 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+ patreon : # Replace with a single Patreon username
5+ open_collective : # Replace with a single Open Collective username
6+ ko_fi : # Replace with a single Ko-fi username
7+ tidelift : # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+ community_bridge : # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+ liberapay : # Replace with a single Liberapay username
10+ issuehunt : # Replace with a single IssueHunt username
11+ otechie : # Replace with a single Otechie username
12+ custom : http://buymeacoffee.com/numan.dev # Replace with a single custom sponsorship URL
Original file line number Diff line number Diff line change 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+
17# react-native-compressor
28
39<!-- Title -->
Original file line number Diff line number Diff line change @@ -282,11 +282,15 @@ PODS:
282282 - React-jsinspector (0.64.1)
283283 - react-native-background-upload (6.2.4):
284284 - React
285+ <<<<<<< HEAD
285286<<<<<<< HEAD
286287 - react-native-compressor (0.5.4):
287288=======
288289 - react-native-compressor (1.0.3):
289290>>>>>>> e12330f... feat: add minimumFileSizeForCompress for customize minimum video file to compress
291+ =======
292+ - react-native-compressor (1.1.0):
293+ >>>>>>> aec9e45... fix: measuredBitRate divided by zero crash. fixed #49
290294 - NextLevelSessionExporter
291295 - React-Core
292296 - react-native-create-thumbnail (1.4.1):
@@ -637,7 +641,7 @@ SPEC CHECKSUMS:
637641 React-jsinspector: 8c0517dee5e8c70cd6c3066f20213ff7ce54f176
638642 React-logger: bfddd3418dc1d45b77b822958f3e31422e2c179b
639643 react-native-background-upload: 994d4e8abbcc1d0b0cff68d950429906ed68ca67
640- react-native-compressor: fd8cc4b27fcd00e5e784b4d8d00583075326811f
644+ react-native-compressor: 2b0f75c5e887830955b32e0ddf22ef2efe0f179e
641645 react-native-create-thumbnail: d31c84dd69fb4d60aec0ff2f49bc0de41ede7b2c
642646 react-native-document-picker: 226068006be4c52f8ef7f32d855ee025a12e9e64
643647 react-native-get-random-values: 2c4ff6b44cb71291dabe9a8ae87d3877dcf387da
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ export default function App() {
112112 sourceVideo ,
113113 {
114114 compressionMethod : 'auto' ,
115- minimumFileSizeForCompress : 16 ,
115+ minimumFileSizeForCompress : 2 ,
116116 } ,
117117 ( progress ) => {
118118 if ( backgroundMode ) {
Original file line number Diff line number Diff line change @@ -245,8 +245,8 @@ func makeValidUri(filePath: String) -> String {
245245 let compressFactor : Float = 0.8
246246 let minCompressFactor : Float = 0.8
247247 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 )
250250 remeasuredBitrate = remeasuredBitrate*Int ( compressFactor)
251251 let minBitrate : Int = self . getVideoBitrateWithFactor ( f: minCompressFactor) / ( 1280 * 720 / ( width * height) )
252252 if ( originalBitrate < minBitrate) {
You can’t perform that action at this time.
0 commit comments