Closed SaritaDevAndroid closed 1 year ago
try set isExternal to false
Hi, @SaritaDevAndroid , sorry for the late reply. Can you confirm if you have WRITE_EXTERNAL_STORAGE and is requested at run time?
@AbedElazizShe there's a crash in API >=30 because of the saveVideoInExternal
function in the VideoCompresssor.kt
class. Due to the scoped storage in android 11 and above it returns an illegalArgument Exception
Hi @charlesgles9 could you confirm this issue happens in the last release? My phones are runnign android 11, 12, and 13, and I have no issues now. Please share the error log to understand what I might have missed and try to fix it as soon as posible.
Thanks a lot
Error : java.io.FileNotFoundException: : open failed: ENOENT (No such file or directory)
Code : VideoCompressor.start( context = applicationContext, // => This is required uris = toUri, // => Source can be provided as content uris isStreamable = true, storageConfiguration = StorageConfiguration( saveAt = Environment.DIRECTORY_MOVIES, // => the directory to save the compressed video(s). Will be ignored if isExternal = false. isExternal = true, // => false means save at app-specific file directory. Default is true. ), configureWith = Configuration( quality = VideoQuality.HIGH, isMinBitrateCheckEnabled = true, videoBitrate = 3677198, /Int, ignore, or null/ disableAudio = false, /Boolean, or ignore/ keepOriginalResolution = false, /Boolean, or ignore/ videoWidth = 360.0, /Double, ignore, or null/ videoHeight = 480.0 /Double, ignore, or null/ ),