thyagoluciano / flutter_radio

Radio station streaming example with ExoPlayer and Flutter.
GNU General Public License v3.0
86 stars 41 forks source link

Exoplayer2 library throwing InvalidResponseCodeException on a 302 Redirect of http to http url #46

Open JohnBaker123 opened 4 years ago

JohnBaker123 commented 4 years ago

Exoplayer2 library throwing InvalidResponseCodeException on a 302 Redirect.

I have a http url that is redirecting to another http url with 302 redirect response.

and this is thrown.

E/ExoPlayerImplInternal( 7283): Source error. E/ExoPlayerImplInternal( 7283): com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 302 E/ExoPlayerImplInternal( 7283): at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:211) E/ExoPlayerImplInternal( 7283): at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:147) E/ExoPlayerImplInternal( 7283): at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:844) E/ExoPlayerImplInternal( 7283): at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:320) E/ExoPlayerImplInternal( 7283): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) E/ExoPlayerImplInternal( 7283): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) E/ExoPlayerImplInternal( 7283): at java.lang.Thread.run(Thread.java:764)

devsang31 commented 4 years ago

Is there any solution for the above issue?

JohnBaker123 commented 4 years ago

I had to switch to using a different library. Can't remember which one I used.

devsang31 commented 4 years ago

Ohk, than I have to find different library to solve the issue.