Android Question Exoplayer 302 error

Discussion in 'Android Questions' started by Sasuke Sama, Sep 15, 2019.

  1. Sasuke Sama

    Sasuke Sama Active Member Licensed User

    Hi
    Im trying to play m3u8 link
    it run fine on mx and the default android player but in exo im getting this

    Code:
    com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 302
    and the video dosent load

    any ideas?

    i found this by searching


    "Ideally I think you should fix your serving infrastructure to not perform cross-protocol redirects. However if you can't do this, you can enable following of cross-protocol redirects in ExoPlayer by passing allowCrossProtocolRedirects=true to the DefaultUriDataSource constructor."

    so maybe someone can translate this to b4a?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    302 means that the server redirected to a different one. You should find the actual target and use it. Also possible to find it with OkHttpUtils2.

    It is not simple to set allowCrossProtocolRedirects as the relevant object is created by the player thread internally.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice