-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Android Video compression error: setDataSource failed: status = 0x80000000 #307
Comments
👋 @PhilippPriller |
@PhilippPriller hi, did you managed to solve this? |
I added a path normalizer and it fixed it for me: import {
createVideoThumbnail
} from 'react-native-compressor';
export function normalizePath(str: string, allPlatforms = false): string {
if (isAndroid || allPlatforms) {
if (!str.startsWith('file://')) {
return `file://${str}`;
}
}
return str;
}
const thumbnail = (await createVideoThumbnail(
normalizePath(localVideo.uri)
)) as VideoThumbnail; |
Hey @efstathiosntonas thanks for the reply. I was not able to solve this issue. Since this is an extremely rare edge case in my app I decided to simply not compress the video in the case of the error. |
Current behavior
Video.compress() crashes on Android 10 (Samsung Galaxy A7) with error: setDataSource failed: status = 0x80000000.
Works on all my other Android Devices, but all of them have Android Version > 10, so maybe thats the issue.
Expected behavior
Should work :)
Platform
React Native Version
0.74.3
React Native Compressor Version
1.8.25
Reproducible Steps And Demo
I've been able to trace the issue all the way into the
AutoVideoCompression.kt
file.There on line 19 setting the data source for some reason fails on that device.
I've tried passing the path without the "file:///" part or even passing it as an base64 uri, but on that device nothing seems to work.
The text was updated successfully, but these errors were encountered: