react-native-audio-waveform
react-native-audio-waveform copied to clipboard
ExpectedPoints is zero, cannot perform division
trafficstars
[Error: expectedPoints is zero, cannot perform division]
received when using path that has been downloaded from remote URI:
const remoteUri = 'https://example.com/test_audio.mp3';
const localUri = FileSystem.documentDirectory + 'test_audio.mp3';
...
useEffect(() => {
const downloadFile = async () => {
try {
const { uri } = await FileSystem.downloadAsync(remoteUri, localUri);
console.log('File downloaded to:', uri);
setFileExists(true);
startPlayer();
} catch (error) {
console.error('Error downloading file:', error);
}
};
}, []);
where localUri is passed to the path prop. I'm using a bare javascript react-native setup (recently ejected from expo). I have confirmed that the file does exist both in the local and remote form.
Hi @Exoplanetarium Thank you for using this library and reporting this issue, Could you please share the complete localUri?