diff --git a/BilibiliLive/Component/Player/BilibiliVideoResourceLoaderDelegate.swift b/BilibiliLive/Component/Player/BilibiliVideoResourceLoaderDelegate.swift index 59476a36..7ccbc907 100644 --- a/BilibiliLive/Component/Player/BilibiliVideoResourceLoaderDelegate.swift +++ b/BilibiliLive/Component/Player/BilibiliVideoResourceLoaderDelegate.swift @@ -238,9 +238,9 @@ class BilibiliVideoResourceLoaderDelegate: NSObject, AVAssetResourceLoaderDelega reset() hasSubtitle = subtitles.count > 0 var videos = info.dash.video - if Settings.preferHevc { - if videos.contains(where: { $0.isHevc }) { - videos.removeAll(where: { !$0.isHevc }) + if Settings.preferAvc { + if videos.contains(where: { !$0.isHevc }) { + videos.removeAll(where: { $0.isHevc }) } } diff --git a/BilibiliLive/Component/Settings.swift b/BilibiliLive/Component/Settings.swift index 75c3534b..edc3c92f 100644 --- a/BilibiliLive/Component/Settings.swift +++ b/BilibiliLive/Component/Settings.swift @@ -36,8 +36,8 @@ enum Settings { @UserDefault("Settings.losslessAudio", defaultValue: false) static var losslessAudio: Bool - @UserDefault("Settings.preferHevc", defaultValue: false) - static var preferHevc: Bool + @UserDefault("Settings.preferAvc", defaultValue: false) + static var preferAvc: Bool @UserDefault("Settings.defaultDanmuStatus", defaultValue: true) static var defaultDanmuStatus: Bool diff --git a/BilibiliLive/Module/Personal/SettingsViewController.swift b/BilibiliLive/Module/Personal/SettingsViewController.swift index dbe154ee..5688a7c4 100644 --- a/BilibiliLive/Module/Personal/SettingsViewController.swift +++ b/BilibiliLive/Module/Personal/SettingsViewController.swift @@ -135,9 +135,9 @@ class SettingsViewController: UIViewController { } cellModels.append(losslessAudio) - let hevc = CellModel(title: "Hevc优先", desp: Settings.preferHevc ? "开" : "关") { + let hevc = CellModel(title: "Avc优先(卡顿尝试开启)", desp: Settings.preferAvc ? "开" : "关") { [weak self] in - Settings.preferHevc.toggle() + Settings.preferAvc.toggle() self?.setupData() } cellModels.append(hevc)