react-native-audio-streaming icon indicating copy to clipboard operation
react-native-audio-streaming copied to clipboard

AACPlayer issue when playing certain stream on Android

Open tychota opened this issue 7 years ago • 11 comments

Hi, I just manage to spot a difficult to reproduce problem on Android.

Steps I did to see the problem

  1. Upload a acc to AWS S3 using react-native-audio to record the AAC and RN XMLHttpRequest to serve
  2. Be sure that it is serve from aws S3 (no cloudfront in beetween) with content type AAC
  3. Use react-native-audio-streaming to play the content
  4. See it does nothing

Sometimes, with some file or after a delay (?? not sure about it) It does manage to play the file, but sometimes it fail, so it is hard to reproduce. Note that the same file work perfectly on iOS

Debug message

As I was able to find a bugging case on a real android device (ZTE Axon Pro Android 5.0.2 and kernel 3.10.49 on a Qualcomm810 processor), I did get the following pidcat bug (with redacted private header that content private metadata).

screen shot 2016-11-18 at 15 49 19

This seems to be related to this line: https://github.com/vbartacek/aacdecoder-android/blob/master/decoder/jni/aac-decoder/aac-decoder.c#L427

I'm pretty noob with aac, but I read somewhere in the net that it can be because my file as an ADIF header instead of an ADTS and thus vbartacek/aacdecoder-android can't read it

Hope you have enough info to help me.

tychota avatar Nov 18 '16 15:11 tychota

Hello,

I'm sorry but I have no idea about the issue there. If meta informations are not needed for your case, you could try the new implementation with ExoPlayer https://github.com/tlenclos/react-native-audio-streaming/pull/44.

tlenclos avatar Nov 18 '16 15:11 tlenclos

#44 seems month old so I did not give a try but if you think it will work, I will be please to test.

tychota avatar Nov 18 '16 15:11 tychota

(wrong button)

tychota avatar Nov 18 '16 15:11 tychota

I rebased it and did an update of the underlying android library. Sadly it does not provide meta information for the moment.

tlenclos avatar Nov 18 '16 15:11 tlenclos

What do you mean by metadata (just to be sure) ?

Shall I redo my work (url/progress) on top of that or this is already feature compatible with iOS.

tychota avatar Nov 18 '16 15:11 tychota

I mean artist and song name. This is not feature compatible yet but I'm waiting for a new release of the library.

tlenclos avatar Nov 18 '16 15:11 tlenclos

Ah ID3 tags ? Cool !

Ok :) will it interest you that I do the same stuff I did to send the url and the progress in the RN event, like I did before, but on top of Exoplayer.

By the way Exo player look awesome. I mean when the branch will land, it will be a great progress. Ty for doing this.

tychota avatar Nov 18 '16 15:11 tychota

Yes you can if you really need this feature, and we could merge it in my branch then.

tlenclos avatar Nov 18 '16 16:11 tlenclos

+1 happens to me too... any luck resolving the issue?

Maybe this is related: http://stackoverflow.com/questions/22759095/aacdecoder-android-cannot-start-native-decoder

And this regarding the ADTS header https://github.com/vbartacek/aacdecoder-android/issues/29

yaronlevi avatar Feb 14 '17 21:02 yaronlevi

Still happens to me on Android.. Plugin version is 2.3.2

cherniv avatar Apr 03 '17 06:04 cherniv

+1

cinder92 avatar Oct 09 '17 17:10 cinder92