Fix the list of available resolutions

This commit is contained in:
Bnyro 2023-01-14 08:38:00 +01:00 committed by GitHub
parent 4574c57894
commit e01a3d8465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1206,7 +1206,7 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
private fun getAvailableResolutions(): List<VideoResolution> { private fun getAvailableResolutions(): List<VideoResolution> {
val resolutions = exoPlayer.currentTracks.groups.map { group -> val resolutions = exoPlayer.currentTracks.groups.map { group ->
(0 until group.length).map { (0 until group.length).map {
group.getTrackFormat(it).width group.getTrackFormat(it).height
} }
}.flatten() }.flatten()
.filter { it > 0 } .filter { it > 0 }