mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
Merge pull request #6200 from Bnyro/master
fix: video codec preference doesn't work when HLS enabled
This commit is contained in:
commit
4ffaeadfc5
@ -1313,11 +1313,11 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
|||||||
if (enabledVideoCodecs != "all") {
|
if (enabledVideoCodecs != "all") {
|
||||||
// map the codecs to their corresponding mimetypes
|
// map the codecs to their corresponding mimetypes
|
||||||
val mimeType = when (enabledVideoCodecs) {
|
val mimeType = when (enabledVideoCodecs) {
|
||||||
"vp9" -> "video/webm"
|
"vp9" -> arrayOf("video/webm", "video/x-vnd.on2.vp9")
|
||||||
"avc" -> "video/mp4"
|
"avc" -> arrayOf("video/mp4", "video/avc")
|
||||||
else -> throw IllegalArgumentException()
|
else -> throw IllegalArgumentException()
|
||||||
}
|
}
|
||||||
this.setPreferredVideoMimeType(mimeType)
|
this.setPreferredVideoMimeTypes(*mimeType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user