zmxv / react-native-sound

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

Cannot play .aac files #406

Open schumannd opened 6 years ago

schumannd commented 6 years ago

I observe the same behavior and error codes as described in this SO article.

They also offer a solution of using AVPlayer instead of AVAudioPlayer.

Amongst the files I tested with was the .AAC file from this site

Is the sample file encoded in a wrong way? Is anyone else having similar problems?

arrygoo commented 6 years ago

I'm having this issue if the .AAC file is recorded on Android and try to play it on ios

arrygoo commented 6 years ago

@schumannd have you found a solution? I'm able to consistently reproduce this issue with .aac files recorded via react-native-audio from an android device. This is not an issue when the file is directly streamed from a URL, but once you download it ios is not able to play it back. No such issue if the files are recorded on ios.

schumannd commented 6 years ago

I resorted to using mp3 for now. Sad but easy solution

Linoa65 commented 5 years ago

Same issue on Android. Unable to play sound previously recorded on IOS with react-native-audio. There is an alternative to do that ? I tried to download it before playing for the same result... How can we play this kind of files ?

paulmelnikow commented 5 years ago

@Linoa65 There was a comment as https://github.com/zmxv/react-native-sound/issues/222#issuecomment-381942954 which described a fix for the same issue. Any chance that fixes it?

If not, could you open a new issue, fill out the issue template with code + include a link to a recorded file that won't play?

Same for anyone else who is still experiencing this issue, please! When we have a reproducible test case it makes it more possible for someone who is interested to step in and fix it, and know that the fix solves the problem for everyone else.

Balasnest commented 4 years ago

@schumannd Even with mp3. Reference Reproducible step:

  1. Record audio from any voice recorder app (try with ios and android also). It will save in mp3 format.
  2. Play the both recorded audio in android and ios.
  3. Both audio plays in android, but iOS failed to play both.

@paulmelnikow ^

muhammadashfaq commented 4 years ago

I resorted to using mp3 for now. Sad but easy solution

Can you please eleboarte . how did you convert .aac to mp3 ?

schumannd commented 4 years ago

@schumannd i do no conversion in the app. I make sure that the files are provided in the .mp3 format by us.