mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fixed bad io
This commit is contained in:
parent
ad64cb3f86
commit
cb4ab7ea23
1 changed files with 3 additions and 4 deletions
|
@ -315,7 +315,9 @@ class CS3IPlayer : IPlayer {
|
||||||
val interceptor = provider.getVideoInterceptor(link)
|
val interceptor = provider.getVideoInterceptor(link)
|
||||||
|
|
||||||
val source = if (interceptor == null) {
|
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 {
|
} else {
|
||||||
val client = app.baseClient.newBuilder()
|
val client = app.baseClient.newBuilder()
|
||||||
.addInterceptor(interceptor)
|
.addInterceptor(interceptor)
|
||||||
|
@ -335,9 +337,6 @@ class CS3IPlayer : IPlayer {
|
||||||
|
|
||||||
return source.apply {
|
return source.apply {
|
||||||
setDefaultRequestProperties(headers)
|
setDefaultRequestProperties(headers)
|
||||||
|
|
||||||
//https://stackoverflow.com/questions/69040127/error-code-io-bad-http-status-exoplayer-android
|
|
||||||
// setAllowCrossProtocolRedirects(true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue