mirror of
https://github.com/yattee/yattee.git
synced 2026-06-04 22:04:19 +00:00
Show playback failure overlay on tvOS
Previously a failed video left the user staring at a black screen / thumbnail with no indication anything went wrong — playbackState went to .failed but TVPlayerView never read it. Add a focusable glass overlay (Details / Retry / Play Next or Close) gated on isFailed and a parallel one for retry-exhausted state, with the regular controls and background tap-target disabled while either is visible so focus stays inside the overlay. Hide the Copy/Share toolbar items in ErrorDetailsSheet on tvOS where they aren't useful.
This commit is contained in:
@@ -113,6 +113,7 @@ struct ErrorDetailsSheet: View {
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
#endif
|
||||
.toolbar {
|
||||
#if !os(tvOS)
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
Button(role: .cancel) {
|
||||
dismiss()
|
||||
@@ -131,14 +132,13 @@ struct ErrorDetailsSheet: View {
|
||||
}
|
||||
.accessibilityLabel(String(localized: "player.error.copy.accessibilityLabel"))
|
||||
|
||||
#if os(iOS) || os(macOS)
|
||||
// Share button (not available on tvOS)
|
||||
ShareLink(item: errorMessage) {
|
||||
Label(String(localized: "player.error.share"), systemImage: "square.and.arrow.up")
|
||||
}
|
||||
.accessibilityLabel(String(localized: "player.error.share.accessibilityLabel"))
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if os(iOS)
|
||||
|
||||
Reference in New Issue
Block a user