react-native-compressor
react-native-compressor copied to clipboard
{"error": [TypeError: null is not an object (evaluating 'NativeVideoCompressor.compress')]} compression error
greetings to all , it seems it is returning my value null but when i console value its not null.
Expected behavior
Platform [X] Android
compressor version : 1.5.0
React Native Version
My Code . const videoGallery = () => { ImagePicker.openPicker({ mediaType: 'video', }).then(video => { if (video.size / (1024 * 1024) < 10) { setLink(video.path); testCompress(video.path); } else { showToast(); } }); };
const testCompress = async e => { try { const result = await Video.compress( e, { compressionMethod: 'auto', }, progress => { if (backgroundMode) { console.log('Compression Progress: ', progress); console.log(progress); } else { setCompressingProgress(progress); console.log(progress); } }, ); console.log(result); console.log({result}, 'compression result'); } catch (error) { console.log({error}, 'compression error'); } };
@savataqe1 I think you have an issue with linking. can you try to do manual linking and check? https://github.com/Shobbak/react-native-compressor#android
@savataqe1 I think you have an issue with linking. can you try to do manual linking and check? https://github.com/Shobbak/react-native-compressor#android
{"error": [TypeError: Cannot read property 'compress' of null]} compression error .. I downloaded it manually and downloaded it normally, but I'm getting the same error