mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 10:25:02 +00:00
Redesign tvOS player controls with centered transport cluster
- Move Close to a top-right circular icon; bottom row reorganizes into left (Settings/Info/Comments), center transport (Previous/PlayPause/Next), and right (Queue) clusters with equal side frames so transport stays geometrically centered. - Introduce a circular icon-only `TVTransportButtonStyle` (primary variant for Play/Pause) mirroring the new Close button look. - Always render Previous/Next so Play/Pause position is fixed; dim and disable when unavailable. - Share `isTransportDisabled` on `PlayerState` and reuse it on iOS and tvOS; apply it (plus symbol replace transition) to the tvOS Play/Pause button.
This commit is contained in:
@@ -422,6 +422,16 @@ final class PlayerState {
|
||||
videoAspectRatio ?? (16.0 / 9.0)
|
||||
}
|
||||
|
||||
/// Whether transport controls (play/pause, seek) should be blocked because
|
||||
/// the player isn't ready yet — loading, buffering, or waiting for the
|
||||
/// first frame / initial buffer. Shared by iOS and tvOS control overlays.
|
||||
var isTransportDisabled: Bool {
|
||||
playbackState == .loading
|
||||
|| playbackState == .buffering
|
||||
|| !isFirstFrameReady
|
||||
|| !isBufferReady
|
||||
}
|
||||
|
||||
// MARK: - Methods
|
||||
|
||||
/// Updates the current video and stream.
|
||||
|
||||
Reference in New Issue
Block a user