fix crash caused by default resolution

This commit is contained in:
Bnyro 2022-11-16 18:55:12 +01:00 committed by Kavin
parent 0a200a6d26
commit 58c606c858
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD

View File

@ -1166,7 +1166,7 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
} }
private fun setStreamSource(streams: Streams) { private fun setStreamSource(streams: Streams) {
val defaultResolution = PlayerHelper.getDefaultResolution(requireContext()) val defaultResolution = PlayerHelper.getDefaultResolution(requireContext()).replace("p", "")
if (defaultResolution != "") { if (defaultResolution != "") {
val params = trackSelector.buildUponParameters() val params = trackSelector.buildUponParameters()
.setMaxVideoSize(Int.MAX_VALUE, defaultResolution.toInt()) .setMaxVideoSize(Int.MAX_VALUE, defaultResolution.toInt())