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

压缩后打印出来的本地路径和原路径相同 #255

Closed
caijiami opened this issue Dec 11, 2023 · 4 comments
Closed

压缩后打印出来的本地路径和原路径相同 #255

caijiami opened this issue Dec 11, 2023 · 4 comments

Comments

@caijiami
Copy link

"react-native-compressor": "1.0.0",
"react-native": "0.64.2",

上面事版本好,下面是调用的方法
let uri=(videos[0].uri.indexOf('file://')!=-1?'':'file://')+videos[0].uri console.log(uri) const result = await Video.compress( uri, { compressionMethod: 'auto', bitrate: 49152 // 48K 可以修改 }, (progress) => { console.log('Compression Progress: ', progress); } ); console.log(result);

打印出来的uri和result相同

Copy link

👋 @caijiami
Thanks for opening your issue here! If you find this package useful hit the star🌟!

@caijiami
Copy link
Author

@只有在ios的时候会出现这种情况

@numandev1
Copy link
Owner

@caijiami i am very busy in my company job, hopefully i will look into after week

@caijiami
Copy link
Author

@caijiami i am very busy in my company job, hopefully i will look into after week

I have tried many versions, the latest version 1.8.22 (1.8.4 and above) ios compression is fine, but Android can not build
我尝试了很多版本,最新版本1.8.22(1.8.4及以上)ios压缩很好,但Android无法构建
`Execution failed for task ':react-native-compressor:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details`

Versions 1.6.0 and below build normally, but ios does not compress and still returns to the original video path
低版本1.6.0及以下构建正常,但是ios没有进行压缩,仍然返回原视频路径

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

2 participants