From 104095876a510055b8a88585add01927e2cdd4b8 Mon Sep 17 00:00:00 2001 From: Muhammad Numan Date: Fri, 28 Jan 2022 12:51:55 +0500 Subject: [PATCH] fix: the given long is not in the range of uint32 --- android/build.gradle | 2 +- .../main/java/com/reactnativecompressor/Utils/Utils.java | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index ad0aaf2..a719a8e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -57,6 +57,6 @@ dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules implementation 'io.github.lizhangqu:coreprogress:1.0.2' - implementation 'com.github.nomi9995:VideoCompressor:90adcba85a' + implementation 'com.github.nomi9995:VideoCompressor:4f72b53490' // implementation project(path: ':videocompressor') } diff --git a/android/src/main/java/com/reactnativecompressor/Utils/Utils.java b/android/src/main/java/com/reactnativecompressor/Utils/Utils.java index f77fdaf..9d46ca6 100644 --- a/android/src/main/java/com/reactnativecompressor/Utils/Utils.java +++ b/android/src/main/java/com/reactnativecompressor/Utils/Utils.java @@ -43,7 +43,14 @@ public void onFinish(boolean result) { @Override public void onError(String errorMessage) { - promise.reject("Compression has canncelled"); + if(errorMessage.equals(("class java.lang.AssertionError"))) + { + promise.resolve(srcPath); + } + else + { + promise.reject("Compression has canncelled"); + } } @Override