mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 13:50:30 +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") {
|
||||
// map the codecs to their corresponding mimetypes
|
||||
val mimeType = when (enabledVideoCodecs) {
|
||||
"vp9" -> "video/webm"
|
||||
"avc" -> "video/mp4"
|
||||
"vp9" -> arrayOf("video/webm", "video/x-vnd.on2.vp9")
|
||||
"avc" -> arrayOf("video/mp4", "video/avc")
|
||||
else -> throw IllegalArgumentException()
|
||||
}
|
||||
this.setPreferredVideoMimeType(mimeType)
|
||||
this.setPreferredVideoMimeTypes(*mimeType)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user