AbedElazizShe / LightCompressor

A powerful and easy-to-use video compression library for android uses MediaCodec API.
Apache License 2.0
524 stars 116 forks source link

InputStream as Output/Destination Path #89

Closed dev-sareno closed 2 years ago

dev-sareno commented 3 years ago

On modern Android OS (e.g. Android 11+), sometimes, you have to use MediaStore for choosing the target file to write but, it gives you an Uri rather than a File. We can write on that Uri through Context#getContentResolver().openInputStream(uri) but it returns an InputStream hence, why it is useful as Write Path rather than alternatives.

AbedElazizShe commented 3 years ago

@dev-sareno Thank you for opening this issue and for the provided details. I haven't explored the Android 11+ changes yet regarding media handling. I will look into that and improve the library accordingly, i will make this suggestion as priority 1 and will inform you when it is done.

Thank you

dev-sareno commented 3 years ago

My bad, I was pertaining to OutputStream as the Write Path parameter and not InputStream.