Commit Graph

57 Commits

Author SHA1 Message Date
hl-valdemar 230949bb95 feat: add a native CLI launcher for local and YouTube playback
Build .build/terebi beside the app. Parse a single local file or YouTube URL, --url, --, and help; reject invalid commands before GUI launch. Resolve the adjacent app through symlinks and launch through NSWorkspace, reusing its process/window and saved progress.

Launch the app without media before delivering URL events. Raw media argv suppress SwiftUI's initial singleton window. Own warm document and internet Apple events because SwiftUI's default external-event routing closes that window; retain initial Finder document delivery to create it.

Verified actual CLI 0/64/69 exit behavior, PATH/symlink discovery from another directory, cold local/YouTube playback, warm local/YouTube replacement in the same native window/process, resume, Finder-style cold launch, and make all check.
2026-10-11 00:45:24 +02:00
hl-valdemar 0411064f0c feat: remember playback progress across player restarts
Persist authoritative per-video positions in UserDefaults. Save periodic checkpoints, pause, close, replacement, and quit; restore a validated position before autoplay. Canonical YouTube webpage URLs survive fresh stream extraction, and local symlinks share file progress.

Clear completed or out-of-duration bookmarks. Leave failed opens and live/non-seekable inputs out of persistence. Pending opens hide errors belonging to the previous source.

Verified separate-process restart, source replacement, failed-open recovery, completion, checkpoints, real YouTube short-link resume, live exclusion, and make all check.
2026-10-10 23:44:48 +02:00
hl-valdemar 5bc0d81bbf fix: keep initial playback focus off the titlebar pin
Restore the playback window as first responder after initial setup and after file/YouTube dialogs return. Keep native control focus indicators and Tab navigation unchanged.

Verified hidden native window focus, both dialog cancellations, explicit control focus, Tab navigation, P shortcut, app build, and compact-window checks.
2026-10-10 23:21:26 +02:00
hl-valdemar 8fb08db6f3 feat: stream YouTube video with coordinated audio and video inputs
Resolve public YouTube URLs through external yt-dlp and play selected streams in the existing native window.

Independent bounded network readers keep one authored timeline. Successful seeks clear FFmpeg's sticky aborted-read AVIO error; manifest seekability uses native format flags rather than a top-level I/O handle.

Verified real YouTube playback, seeking, frame stepping, compact mode, cancellation, and the complete native regression checks.
2026-10-10 23:02:19 +02:00
hl-valdemar a6bebb05c0 feat: replace normal fullscreen control with compact-mode button 2026-10-10 22:05:54 +02:00
hl-valdemar fa66020951 feat: add same-window compact playback with magnetic snapping 2026-10-10 21:34:08 +02:00
hl-valdemar 681a7be6f7 chore: rename project and app to terebi 2026-10-10 20:32:14 +02:00