zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.78k stars 748 forks source link

Wav file not playing in iOS. #720

Closed TheChanDI closed 3 years ago

RomualdPercereau commented 3 years ago

Hello, Waw is supported on iOS, do you have any code example? Which version off react-native-sound and react-native are you using?

List of supported audio formats https://developer.apple.com/library/archive/documentation/MusicAudio/Conceptual/CoreAudioOverview/SupportedAudioFormatsMacOSX/SupportedAudioFormatsMacOSX.html

TheChanDI commented 3 years ago

Hello @RomualdPercereau, I am using a remote URL of type .wav format. In android, it is working fine but in ios, it doesn't play. here is the audio url: http://103.198.9.169/sherpadictionary-web-interface/content/view/sherpaDictionaryArchive/wordPronunciationClip/%E0%A4%9A%E0%A5%8D%E0%A4%AF%E0%A5%80%E0%A4%B5%E0%A4%A6%E0%A4%BE%E0%A4%B5%E0%A4%BE/%E0%A4%9A%E0%A5%8D%E0%A4%AF%E0%A5%80%E0%A4%B5%E0%A4%A6%E0%A4%BE%E0%A4%B5%E0%A4%BE_59719.wav

React Native version: 0.63.4 React native sound version: 0.11.0

TheChanDI commented 3 years ago

It looks like the remote URL is not supported for now. So I have to bridge to make it work in iOS.

into-piece commented 3 years ago

It looks like the remote URL is not supported for now. So I have to bridge to make it work in iOS.

Same question. But I work fine in Simulator, though it doesn't work when running on device

Finally I solved this problem, by using react-native-fs to download file first ...

TheChanDI commented 3 years ago

There isn't a fixed solution for this right now but we can get the solution in other ways.