Closed amrreda1995 closed 1 year ago
Thanks a lot for your contribution. I have merged your PR and will release a new version soon. i am testing on samsung A51 to try to find the potential issue.
Great. Thanks for the approval. In order to reproduce the issue; try to compress a video with large size. For me, I was trying to compress 1.5 GB video (UHD quality).
Firebase crashlytics reported that there's some ANR happens because of some block of code running in the main thread. After Investigation, I found that the compressing library code uses EmptyCoroutineContext which is considered the app main thread. I made a small Pull Request with a fix for this issue by providing the IO context for kotlin coroutines to force code to be run in the IO thread.
Below, you can find attachments for the ANR in firebase crashlytics
Also, here are you a Pull Request for a small fix for this small issue https://github.com/AbedElazizShe/LightCompressor/pull/171