mirror of
https://github.com/yattee/yattee.git
synced 2026-06-24 23:54:19 +00:00
Cancel tvOS scrub with Menu button instead of seeking
Pressing Menu while scrubbing now discards the pending scrub and leaves playback time unchanged, instead of committing the seek via the focus-loss path.
This commit is contained in:
@@ -27,6 +27,9 @@ struct TVPlayerControlsView: View {
|
||||
var remoteSeekTime: TimeInterval? = nil
|
||||
/// Called when user presses left/right on the focused bar outside SELECT scrub.
|
||||
var onRemoteSeek: ((Bool) -> Void)? = nil
|
||||
/// Bumped by the parent to cancel any in-progress scrub without seeking
|
||||
/// (used when the Menu button is pressed while scrubbing).
|
||||
var cancelScrubTrigger: UUID? = nil
|
||||
|
||||
/// Whether the Debug button should be visible (user-toggled in Developer settings).
|
||||
private var showDebugButton: Bool {
|
||||
@@ -64,7 +67,8 @@ struct TVPlayerControlsView: View {
|
||||
isLive: playerState?.isLive ?? false,
|
||||
sponsorSegments: playerState?.sponsorSegments ?? [],
|
||||
remoteSeekTime: remoteSeekTime,
|
||||
onRemoteSeek: onRemoteSeek
|
||||
onRemoteSeek: onRemoteSeek,
|
||||
cancelScrubTrigger: cancelScrubTrigger
|
||||
)
|
||||
.focusSection()
|
||||
.padding(.horizontal, 88)
|
||||
|
||||
Reference in New Issue
Block a user