I have a problem. I view radio channels inside my application and use assets_audio_player(https://pub.dev/packages/assets_audio_player) and I also use several others but the same problem. which is as follows.
> isRestricted mode = 0 E/ExoPlayerImplInternal(30199): Playback error
> E/ExoPlayerImplInternal(30199):
> com.google.android.exoplayer2.ExoPlaybackException: Source error
> E/ExoPlayerImplInternal(30199): at
> com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException:
> Unable to connect E/ExoPlayerImplInternal(30199): at
> com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:356)
> E/ExoPlayerImplInternal(30199): at
> com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:201)
> E/ExoPlayerImplInternal(30199): at
> com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
> E/ExoPlayerImplInternal(30199): at
> com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1015)
> E/ExoPlayerImplInternal(30199): at
> com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:415)
> E/ExoPlayerImplInternal(30199): at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
> E/ExoPlayerImplInternal(30199): at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
> E/ExoPlayerImplInternal(30199): at
> java.lang.Thread.run(Thread.java:919) E/ExoPlayerImplInternal(30199):
> Caused by: javax.net.ssl.SSLHandshakeException:
> java.security.cert.CertPathValidatorException: Trust anchor for
> certification path not found. E/ExoPlayerImplInternal(30199): at
> com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:231)
> E/ExoPlayerImplInternal(30199): at
> com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
> E/ExoPlayerImplInternal(30199): at
> com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
> E/ExoPlayerImplInternal(30199): at
> com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
> E/ExoPlayerImplInternal(30199): at
> com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
> E/ExoPlayerImplInternal(30199): at
> com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
> E/ExoPlayerImplInternal(30199): at
> com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
> E/ExoPlayerImplInternal(30199): at
> com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
> E/ExoPlayerImplInternal(30199): at
> com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
> E/ExoPlayerImplInternal(30199): at
> com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90)
> E/ExoPlayerImplInternal(30199): at
> com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30)
> E/ExoPlayerImplInternal(30199): at
> com.google.android.exoplayer2.upstream.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:641)
> E/ExoPlayerImplInternal(30199): at
> com.google.android.exoplayer2.upstream.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:528)
> E/ExoPlayerImplInternal(30199): at
> com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:349)
> E/ExoPlayerImplInternal(30199): ... 7 more
> E/ExoPlayerImplInternal(30199): Caused by:
> java.security.cert.CertificateException:
> java.security.cert.CertPathValidatorException: Trust anchor for
> certification path not found. E/ExoPlayerImplInternal(30199): at
> com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:658)
android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
> E/ExoPlayerImplInternal(30199): at
> android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:89)
> E/ExoPlayerImplInternal(30199): at
> com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:224)
> E/ExoPlayerImplInternal(30199): at
> com.android.org.conscrypt.ConscryptFileDescriptorSocket.verifyCertificateChain(ConscryptFileDescriptorSocket.java:407)
> E/ExoPlayerImplInternal(30199): at
> com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Meth
network-security-config img this is the URL https://icecast.mada.ps:8495/ajyalnewssl
The problem is not your code, is the stream URL.
I've tested your provided link from the radio on online player like
https://players.akamai.com/
and the sound doesn't open. So, I think this radio is unsupported because it is.mp3
format instead of.m3u8
for STREAMs