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:
Arkadiusz Fal
2026-04-17 21:44:41 +02:00
parent c0184712a9
commit 096df34f64
5 changed files with 216 additions and 106 deletions

View File

@@ -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.