Video playback improvements

This commit is contained in:
Isaac
2024-10-22 16:37:53 +04:00
parent df249f5302
commit a57d64cfe3
14 changed files with 594 additions and 322 deletions

View File

@@ -26,7 +26,7 @@ public final class HLSQualitySet {
for attribute in alternativeFile.attributes {
if case let .Video(_, size, _, _, _, videoCodec) = attribute {
if let videoCodec, NativeVideoContent.isVideoCodecSupported(videoCodec: videoCodec) {
let key = Int(size.height)
let key = Int(min(size.width, size.height))
if let currentFile = qualityFiles[key] {
var currentCodec: String?
for attribute in currentFile.media.attributes {