oops size not length

This commit is contained in:
Cloudburst 2023-08-28 19:29:38 +00:00
parent 1d93eb772e
commit 66edec8a45

View file

@ -968,8 +968,8 @@ class CS3IPlayer : IPlayer {
subtitlesUpdates?.invoke()
// if there are no video tracks, but there are audio tracks, don't pause playback while in background
val videoTrackCount = tracks.groups.filter { it.type == TRACK_TYPE_VIDEO }.length ?: 0
val audioTrackCount = tracks.groups.filter { it.type == TRACK_TYPE_AUDIO }.length ?: 0
val videoTrackCount = tracks.groups.filter { it.type == TRACK_TYPE_VIDEO }.size
val audioTrackCount = tracks.groups.filter { it.type == TRACK_TYPE_AUDIO }.size
shouldPauseUnfocused = videoTrackCount > 0 || audioTrackCount == 0
}
}