fix: http protocol redirects

This commit is contained in:
chrisk325 2026-04-12 14:51:24 +05:30 committed by GitHub
parent 1e67e8a9e5
commit 11222a2db3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,6 +13,7 @@ internal object PlatformPlaybackDataSourceFactory {
useYoutubeChunkedPlayback: Boolean,
): DataSource.Factory {
val httpFactory = DefaultHttpDataSource.Factory()
.setAllowCrossProtocolRedirects(true)
.setDefaultRequestProperties(defaultRequestHeaders)
val baseFactory: DataSource.Factory = DefaultDataSource.Factory(context, httpFactory)
return if (defaultResponseHeaders.isEmpty()) {
@ -24,4 +25,4 @@ internal object PlatformPlaybackDataSourceFactory {
)
}
}
}
}