fixed bad io

This commit is contained in:
LagradOst 2022-05-07 13:39:36 +02:00
parent ad64cb3f86
commit cb4ab7ea23

View file

@ -315,7 +315,9 @@ class CS3IPlayer : IPlayer {
val interceptor = provider.getVideoInterceptor(link)
val source = if (interceptor == null) {
DefaultHttpDataSource.Factory().setUserAgent(USER_AGENT)
DefaultHttpDataSource.Factory() //TODO USE app.baseClient
.setUserAgent(USER_AGENT)
.setAllowCrossProtocolRedirects(true) //https://stackoverflow.com/questions/69040127/error-code-io-bad-http-status-exoplayer-android
} else {
val client = app.baseClient.newBuilder()
.addInterceptor(interceptor)
@ -335,9 +337,6 @@ class CS3IPlayer : IPlayer {
return source.apply {
setDefaultRequestProperties(headers)
//https://stackoverflow.com/questions/69040127/error-code-io-bad-http-status-exoplayer-android
// setAllowCrossProtocolRedirects(true)
}
}