mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 22:32:01 +00:00
Add tvOS A/V sync diagnostics on its own settings page
Surface audio-delay (±10/±100 ms) and video-sync-mode controls behind an "A/V Sync" navigation row in Advanced settings rather than inline, keeping the Advanced page uncluttered. Audio delay applies live to the running MPV instance; sync mode takes effect on next playback.
This commit is contained in:
@@ -32,6 +32,9 @@ struct AdvancedSettingsView: View {
|
||||
#endif
|
||||
streamDetailsSection
|
||||
mpvSection
|
||||
#if os(tvOS)
|
||||
avSyncSection
|
||||
#endif
|
||||
settingsSection
|
||||
#if !os(tvOS)
|
||||
downloadsStorageSection
|
||||
@@ -230,6 +233,26 @@ struct AdvancedSettingsView: View {
|
||||
}
|
||||
}
|
||||
|
||||
#if os(tvOS)
|
||||
@ViewBuilder
|
||||
private var avSyncSection: some View {
|
||||
if let settings = appEnvironment?.settingsManager {
|
||||
SettingsFormSection {
|
||||
NavigationLink {
|
||||
TVSidebarDetailContainer(
|
||||
systemImage: "wave.3.right",
|
||||
title: String(localized: "settings.playback.tvSyncDiagnostics.header")
|
||||
) {
|
||||
AVSyncDiagnosticsView(settings: settings)
|
||||
}
|
||||
} label: {
|
||||
Label(String(localized: "settings.playback.tvSyncDiagnostics.row"), systemImage: "wave.3.right")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private static let mpvBufferOptions: [Double] = [1.0, 2.0, 3.0, 4.0, 5.0]
|
||||
|
||||
private func formatBufferOption(_ seconds: Double) -> String {
|
||||
|
||||
Reference in New Issue
Block a user