Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

压缩完成时调用call.onCallback()函数的第一个参数问题 #2850

Open
moyergo opened this issue Feb 28, 2024 · 0 comments
Open

压缩完成时调用call.onCallback()函数的第一个参数问题 #2850

moyergo opened this issue Feb 28, 2024 · 0 comments

Comments

@moyergo
Copy link

moyergo commented Feb 28, 2024

Current use version?

当前使用的版本是多少?

3.11.2;Android 14

Will this problem occur in demo?

Demo能否复现这问题?

可以

Describe the problem or provide an error log?

在执行压缩后,调用onCallback时,第一个参数不能用uri.getPath(),否则内部“LocalMedia media = queue.get(srcPath)”为null。需要用 uri.toString()。

setCompressEngine(CompressFileEngine { context, source, call ->
        source.forEach { uri ->
               // 压缩逻辑。。。忽略
               /* 在调用onCallback时,第一个参数不能用uri.getPath(),否则内部“LocalMedia media = queue.get(srcPath)”为null。需要用 
                uri.toString()。*/
               call?.onCallback(it.toString(), compressFile.absolutePath)
       }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant