mirror of
https://github.com/yattee/yattee.git
synced 2024-12-25 06:53:42 +00:00
Fix #126
This commit is contained in:
parent
3d05780924
commit
7abe754cef
@ -73,11 +73,11 @@ final class MPVBackend: PlayerBackend {
|
|||||||
|
|
||||||
func bestPlayable(_ streams: [Stream], maxResolution: ResolutionSetting) -> Stream? {
|
func bestPlayable(_ streams: [Stream], maxResolution: ResolutionSetting) -> Stream? {
|
||||||
streams
|
streams
|
||||||
.filter { $0.kind == .adaptive && $0.resolution <= maxResolution.value }
|
.filter { $0.kind != .hls && $0.resolution <= maxResolution.value }
|
||||||
.max { lhs, rhs in
|
.max { lhs, rhs in
|
||||||
let predicates: [AreInIncreasingOrder] = [
|
let predicates: [AreInIncreasingOrder] = [
|
||||||
{ $0.format > $1.format },
|
{ $0.resolution < $1.resolution },
|
||||||
{ $0.resolution < $1.resolution }
|
{ $0.format > $1.format }
|
||||||
]
|
]
|
||||||
|
|
||||||
for predicate in predicates {
|
for predicate in predicates {
|
||||||
|
Loading…
Reference in New Issue
Block a user