I am using react-native-track-player version 1.1.8
I am using the module to play remote url.
It works fine for all android versions less than 9 (Pie)
on Android 9, it fails to play from remote url while it can play a local audio file!
The url is a live streaming server, here it is: http://www.quran-radio.org:8002/i
Is there a solution for this issue?
On Android 9 and above unencrypted traffic is disallowed by default. Since your stream URL is not using https it will not play.
To turn off this setting, add this to your AndroidManifest.xml:
android:usesCleartextTraffic="true"
This should probably be added to the documentation at some point. I'll mark it as "docs" so we don't forget to do so.
I too facing same issue. added android:usesCleartextTraffic="true" in android/app/src/debug/AndroidManifest.xml, but still the issue is not fixed in Android 9 and above.
in Android 8 and below no issue.
Are you seeing any error or warning logs?
Most helpful comment
On Android 9 and above unencrypted traffic is disallowed by default. Since your stream URL is not using https it will not play.
To turn off this setting, add this to your
AndroidManifest.xml:android:usesCleartextTraffic="true"