tvos: the player, with Channels and Options panels #26

Merged
namillis merged 1 commit from feat/tvos-player into main 2026-11-18 07:22:11 +00:00
Owner

Phase 3 of the Apple TV app: the full-screen player, with the Channels panel (mockup 05) on the left and the Options panel (pick A) on the right.

Player (mockup 03)

  • Channel number, a Live / Tuning / Not playing badge, and the clock at the top. At the bottom: the channel, now and next, the progress bar and key hints.
  • The overlay shows on any input and hides 5 s later while a stream plays.
  • A channel that won't play shows a card with the provider's reason. A click tries again.

Remote

  • A UIKit catcher (TVRemoteCatcher) reads presses, so only clicks act. Swipes show the overlay and never change channel (handoff decision 4).
  • Click ▲▼ changes channel in the list the channel was picked from (favorites by default, wrapping). ◀ opens Channels and ▶ opens Options.
  • Back closes a panel, then lowers the player and stops the stream, which frees the pool lease.
  • The Home shell leaves while the player is up. A disabled shell kept SwiftUI focus on Watch, so the first click only moved focus.

Options panel (A)

  • Root: favorite, Source, Audio, Subtitles, Picture, Reload stream, Stream info.
  • Source lists the pool's streams in failover order and marks the current one. Picking one replays the channel pinned to it.
  • Audio tracks, subtitles with size, and picture fit (Fit / Fill / Stretch).
  • Stream info updates live: player, codec, scan, frame rate, shown frames and drops, audio track, bitrate, buffer, source and attempt.

Shared

  • Shared/CaptionsOverlay.swift, split out of LiveWire/CaptionViews.swift, so both apps draw captions the same way.
  • Shared/PlayerTracks.swift: audio track choice, picture fit, stream stats on PlaybackController. The picture fit is applied on the first frame.

Tests

  • build/check.sh: the tvOS scheme builds, and LiveWireTests pass (191).
  • LiveWireTVUITests: 7 pass in the tvOS Simulator. The new TVPlayerUITests cover watch, zap, both panels, Audio and Stream info drill-in, Back, and a source switch. The pool's sources refuse at times, so the tests zap to the next favorite when a channel is turned away.
  • iPhone app smoke-tested in the Simulator (full-screen play).
  • On the Apple TV: ESPN 4K played 2.6 s after launch (FFmpeg, hvc1 3840×2160, 60 fps).

Catch-up and time shift (mockup 06) come in the next PR.

Phase 3 of the Apple TV app: the full-screen player, with the Channels panel (mockup 05) on the left and the Options panel (pick A) on the right. ## Player (mockup 03) - Channel number, a Live / Tuning / Not playing badge, and the clock at the top. At the bottom: the channel, now and next, the progress bar and key hints. - The overlay shows on any input and hides 5 s later while a stream plays. - A channel that won't play shows a card with the provider's reason. A click tries again. ## Remote - A UIKit catcher (`TVRemoteCatcher`) reads presses, so only clicks act. Swipes show the overlay and never change channel (handoff decision 4). - Click ▲▼ changes channel in the list the channel was picked from (favorites by default, wrapping). ◀ opens Channels and ▶ opens Options. - Back closes a panel, then lowers the player and stops the stream, which frees the pool lease. - The Home shell leaves while the player is up. A disabled shell kept SwiftUI focus on Watch, so the first click only moved focus. ## Options panel (A) - Root: favorite, Source, Audio, Subtitles, Picture, Reload stream, Stream info. - Source lists the pool's streams in failover order and marks the current one. Picking one replays the channel pinned to it. - Audio tracks, subtitles with size, and picture fit (Fit / Fill / Stretch). - Stream info updates live: player, codec, scan, frame rate, shown frames and drops, audio track, bitrate, buffer, source and attempt. ## Shared - `Shared/CaptionsOverlay.swift`, split out of `LiveWire/CaptionViews.swift`, so both apps draw captions the same way. - `Shared/PlayerTracks.swift`: audio track choice, picture fit, stream stats on `PlaybackController`. The picture fit is applied on the first frame. ## Tests - `build/check.sh`: the tvOS scheme builds, and `LiveWireTests` pass (191). - `LiveWireTVUITests`: 7 pass in the tvOS Simulator. The new `TVPlayerUITests` cover watch, zap, both panels, Audio and Stream info drill-in, Back, and a source switch. The pool's sources refuse at times, so the tests zap to the next favorite when a channel is turned away. - iPhone app smoke-tested in the Simulator (full-screen play). - On the Apple TV: ESPN 4K played 2.6 s after launch (FFmpeg, hvc1 3840×2160, 60 fps). Catch-up and time shift (mockup 06) come in the next PR.
- Full-screen player (mockup 03): channel number, LIVE/Tuning/Not playing badge,
  now/next with progress, keycap hints, overlay hides after 5 s.
- Siri Remote via a UIKit catcher: clicks zap and open panels, swipes only show
  the overlay. Back closes a panel, then lowers the player and frees the stream.
- Channels panel (mockup 05) on the left, Options panel (pick A) on the right:
  favorite, source list with failover order, audio tracks, subtitles and size,
  picture fit, reload, live stream info.
- Shared: CaptionsOverlay split out of CaptionViews; PlayerTracks (audio track
  choice, picture fit, stream stats).
- The shell leaves while the player is up, so focus lands on the player at once.
- TV UI tests for watch/zap/panels/Back and the source switch; they ride over
  provider refusals by zapping to the next favorite.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
namillis/LiveWireiOS!26
No description provided.