2

I am getting an error given below while integrating JWPlayer with my app.

com.google.android.exoplayer.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 302

This is occurring while trying to play a redirected url (the url may change from http to https) in JWPlayer Android. Is there any additional piece of code required to handle this situation? This is working fine in iOS.

Here is the code

final PlayerConfig playerConfig = new PlayerConfig.Builder()
               .file(videoUrl)
               .autostart(true)
               .image(thumbNailUrl)
               .build();
       jwPlayerView.setup(playerConfig);
       jwPlayerView.play();

1 Answers1

0

Have you tried adding allowCrossProtocolRedirects(true) to your playerConfig?

Most likely, it's due to the mix of using HTTP & HTTPS URLs.

Kim Hyun
  • 90
  • 1
  • 4