Improve streams quality settings

This commit is contained in:
Arkadiusz Fal
2022-03-27 20:59:22 +02:00
parent 83db550c18
commit 61054862d2
6 changed files with 34 additions and 14 deletions

View File

@@ -60,7 +60,7 @@ final class AVPlayerBackend: PlayerBackend {
addPlayerTimeControlStatusObserver()
}
func bestPlayable(_ streams: [Stream]) -> Stream? {
func bestPlayable(_ streams: [Stream], maxResolution _: ResolutionSetting) -> Stream? {
streams.first { $0.kind == .hls } ??
streams.filter { $0.kind == .adaptive }.max { $0.resolution < $1.resolution } ??
streams.first