react-native-sound
react-native-sound copied to clipboard
Error with audio file that comes from the web
:beetle: Description
I develop a multiple platform app that runs on ios, android and web. To ios and android, I'd with RN and React to web. When I record audio in mobile, that sound reproduces ok, but when audio is recorded from web doesn't work on mobile (yes on the web)
MIME-type that I use is 'audio/mp4' on all platforms.
I log object that return new Sound in every case and obtain next:
audio comes from web app. Doesn't works
audio comes from another mobile device. Works
if you see, the only difference is that the duration in case the audio works fine log correctly, but in the case that sound doesn't work, the duration is 0
NOTE: the audio is not broken, I can play it normally from URL origin or by downloading the file :beetle: What is the observed behavior?
The sound file that comes from the web doesn't work on mobile
:beetle: What is the expected behavior?
Sound file should work fine
:beetle: Please post your code:
this.player = new Sound(uri, null, (error) => {
if (error) {
console.error('Error with sound')
}
//... work with sound duration
});
:bulb: Does the problem have a test case?
:bulb: Possible solution
:bulb: Is there a workaround?
:bulb: If the bug is confirmed, would you be willing to create a pull request?
Is your issue with...
- [x] iOS
- [x] Android
- [ ] Windows
Are you using...
- [x] React Native CLI (e.g.
react-native run-android
) - [ ] Expo
- [ ] Other: (please specify)
Which versions are you using?
- React Native Sound: "^0.10.12"
- React Native: "0.59.10"
- iOS: 13
- Android: 9
- Windows:
Does the problem occur on...
- [x] Simulator
- [x] Device
If your problem is happening on a device, which device?
- Device: Xiaomi Redmi 7 Note, Samsung S8, Iphone X, Iphone 7
Try upgrading to react native 0.63
Any update?
Same problem for me, any update on that ? ..