Commit Graph

609 Commits

Author SHA1 Message Date
Arkadiusz Fal
b900c7baad Keep the player top bar at the edge beside a corner cutout
On the iPhone Duo exterior display in landscape with the camera in the
top corner, the window's 82pt top safe area comes only from the camera
and status items block, and dropped the whole top bar below it. When
everything occluding the top safe area sits in one corner, the top bar
stays at the edge and the corner adaptation offset clears the block.

The top bar no longer adds its own leading cutout clearance on top of
that offset, and cutouts only count when they reach into a bar's row.
2026-10-13 23:57:41 +02:00
Arkadiusz Fal
decaec7026 Keep player controls clear of the camera cutout
On the iPhone Duo exterior display in landscape the camera cutout sits
in the bottom trailing corner, outside the safe area, and covered the
rotate button and the end of the progress bar. The top and bottom bars
now take extra padding on the side where an occlusion reserved region
reaches into them. Regions spanning the middle, like a portrait Dynamic
Island, are left to the safe area.
2026-10-13 23:41:32 +02:00
Arkadiusz Fal
7f4555dc2e Keep the macOS corner player layout from being squeezed
The separate player window could be resized below what the corner layout
needs. Free resize now floors at the corner layout's minimum (its width
threshold, the narrowest side column plus a video column wide enough for
the control bar, and 600pt tall), and an undersized window grows to it
when the corner layout takes over. The video column minimum is 560pt on
macOS so the control bar capsule fits.

The control bar's fixed 650pt frame also widened the controls stack past
a narrower video column, clipping the top bar's avatar and close button;
the frame is now capped to the container width.
2026-10-13 23:18:47 +02:00
Arkadiusz Fal
a2ee7d5363 Keep the player pill off the hinge in book posture
On a foldable with the hinge partially open, the corner layout's player
pill moves to the center of the trailing half while the side column is
hidden. It slides with the column as it is dragged away or revealed,
keeping its width.
2026-10-13 19:01:43 +02:00
Arkadiusz Fal
a6dd02e934 Disable the vertical status bar in the player window
On the iPhone Duo exterior display the vertical status bar reserved an
84pt trailing column beside the video. Opt the player window out so the
status bar stays horizontal and the video uses the full width.
2026-10-12 22:48:36 +02:00
Arkadiusz Fal
77c3103748 Keep player buttons off the hinge in book posture
On a foldable with the hinge partially open in landscape, the fullscreen
player's buttons move to the half right of the hinge. The dimming
background and tap handling still cover the whole screen.
2026-10-12 22:03:02 +02:00
Arkadiusz Fal
23d6a605a0 Show an empty-queue placeholder in the queue panel page
When nothing is queued and the history and now-playing sections are
hidden or empty, show the same placeholder as the queue sheet instead
of a blank list.
2026-10-12 21:21:24 +02:00
Arkadiusz Fal
4a9a92d140 Add a Currently Playing toggle to the queue panel page
Below Previously Played in the queue page settings; off by default, so
the queue page lists history and up next without the playing video.
With it off the page opens scrolled to Up Next.
2026-10-12 19:45:02 +02:00
Arkadiusz Fal
e71bb76f13 Default the built-in presets to the corner layout
The built-in presets now use the corner layout, which still falls back
to stacked where it doesn't fit (iPhone, iPad portrait, narrow windows).
In the corner layout the landscape panels open visible unless the preset
says otherwise, on devices that can show it: iPad, macOS, and foldable
iPhones, whose hinge is now remembered once reported. Custom presets and
presets saved without panel settings keep the stacked layout.
2026-10-12 18:24:46 +02:00
Arkadiusz Fal
6c7c0772fd Show the Foldable playback settings on hinged devices
The section carried its own hinge observer but rendered nothing until a
hinge was reported, so the observer never attached and the section never
appeared. Observe the hinge on the always-present form instead.
2026-10-11 23:57:38 +02:00
Arkadiusz Fal
ac88912316 Ask Play Now/Play Next when a video is playing with an empty queue 2026-10-11 22:35:18 +02:00
Arkadiusz Fal
6e8835237d Add a Navigation setting to keep the tab bar on large screens
iPad and iPhone Duo users can pick Tab Bar instead of Automatic to opt
out of the sidebar layout. Switching rebuilds the navigation Settings
lives in, so the change asks for confirmation and lands on Home first.
2026-10-11 21:28:51 +02:00
Arkadiusz Fal
8ade5a54d0 Add a Hide Shorts toggle to the view options
Videos carry isShort from Yattee Server and Piped, and Invidious feed
entries are taken as Shorts when they arrive with no length and aren't
live or upcoming: the feed comes from RSS, which lists Shorts, while
lengths come from the Videos tab, which doesn't. Subscriptions, search
and instance browse hide videos known to be Shorts when the toggle is
on; videos whose source can't tell are always shown.
2026-10-11 14:06:15 +02:00
Arkadiusz Fal
2d3ae1b0e5 Block the player dismiss pan from starting on side sliders
The window-level dismiss pan recognizes before SwiftUI's slider
DragGesture sets isAdjustingPlayerSliders, so dragging volume or
brightness often dismissed the player instead. Side sliders now publish
their frames and the pan refuses to begin from touches inside them.
2026-10-10 23:58:16 +02:00
Arkadiusz Fal
22e94e4f6c Stop double-unscaling the dismiss morph's mini player target
The mini player's SwiftUI global frame already ignores the scale transform
on the main window's content, so mapping it out of that scale again landed
the morph about 8% too large, left and high of the preview, which then
jumped into place when the real mini player took over.
2026-10-10 22:08:29 +02:00
Arkadiusz Fal
8233ac26d7 Collapse the player for Video Info / Go to Channel from rows inside it
Related and queue rows in the player use the default menu context, so the
pushed screen landed underneath the still-expanded player. Collapse on
player state instead of the .player context. Recommendations without an
authorId no longer offer Go to Channel, which opened an empty channel.
2026-10-10 21:27:26 +02:00
Arkadiusz Fal
4510a24d9f Move the channel strip into the Duo status-bar column as a vertical rail
Where the trailing safe-area column is wide enough for avatars (the iPhone
Duo inner screen's vertical status bar), the channel filter becomes a
vertical rail stacked from the bottom of the column instead of a strip over
the feed. The space below the status items and Dynamic Island comes from
iOS 27.1 occlusion reserved regions, which follow the island while the safe
area stays put. The placement is computed in the same pass as the geometry
so the collapsing large title can't drag the rail along for a frame.

Large keeps bigger avatars in the narrow column by giving up padding first.
2026-10-10 19:10:14 +02:00
Arkadiusz Fal
41fb54d278 Land the dismiss morph on the mini player's final position
The mini player reported its frame inside the main window's scaled-down
content, so the morph aimed short of where it ends up once the scale
animates back. The scaled content also had a smaller bottom safe area
(UIKit derives it from the transformed frame) that only came back on the
next layout, lifting the mini player 2pt after the morph landed. Map the
target out of the scale, account for the safe area it gets back, and
re-lay the main window out as the morph starts.
2026-10-10 11:49:38 +02:00
Arkadiusz Fal
09a384763a Stretch the mini player's video preview to fill its frame
Wide videos showed letterbox bars in the tiny iOS mini player preview right
after the dismiss morph, which lands the video filling the preview. The
container that takes the shared player view now sets mpv's keepaspect, so
the mini player fills its frame and every other surface keeps the aspect
ratio.
2026-10-09 23:59:58 +02:00
Arkadiusz Fal
7b1a24a5b0 Morph the expanded player into the mini player on drag-to-dismiss
Releasing the dismiss drag now shrinks the player window onto its video and
flies it into the mini player's preview instead of sliding it off screen and
showing the mini player afterwards. The mini player stays mounted under the
expanded player and reports its preview frame, and the window is masked down
to the video while its root view is transformed onto that frame (with the
safe area the transform drops added back, so the content doesn't jump).

The handoff of the shared MPV view is made seamless: a freshly made player
container waits for its first layout before taking a view that is on screen
elsewhere, sizes and redraws it there, and the window hides in that same
frame. Resizing the render view draws the current frame into the recreated
framebuffer right away instead of leaving it blank until the next tick.

Falls back to the slide when no preview target is available (rotated
session, video preview hidden, different window size).
2026-10-09 23:59:51 +02:00
Arkadiusz Fal
cf8d477351 Inset the mini player into the split view's detail column
The floating overlay ignored the safe area, so the subscriptions channel
strip sat under it on the iPhone Duo inner screen and iPad.
2026-10-09 23:59:41 +02:00
Arkadiusz Fal
6561c664e9 Keep the portrait video on the upper half while the hinge is partially open
With the panel shown, the panel now takes the whole lower half with its
top edge on the hinge, and the video stays centered in the upper half
where it sits with the panel hidden, so toggling the panel never moves it.
2026-10-09 23:59:40 +02:00
Arkadiusz Fal
fe109394df Split the corner layout on the hinge when partially open
On a half-open foldable the side column takes exactly the trailing half,
so the split lands on the hinge. Fully open, the column can now be
resized up to half the width. A re-presented player seeds the hinge
state from the last report so it doesn't animate into the split.
2026-10-09 23:19:39 +02:00
Arkadiusz Fal
4d690d6b71 Keep the video info carousel aligned when its width changes
Unfolding an iPhone Duo kept the old scroll offset, leaving the selected
card misaligned. Re-snap to the current card on width change, and clear
the requested position once it settles so the lazy stack doesn't pull
the next swipe back halfway between cards.
2026-10-08 23:59:53 +02:00
Arkadiusz Fal
82236967b7 Show player toasts and drop the unused instance status
PlayerService's toast manager was never set, so stream refresh, missing
download and skip-to-next toasts were silently dropped. Wire it up in
AppEnvironment.

InstancesManager's per-instance status was never written since the v2
rewrite; account statuses already cover rejected and missing credentials
in the sources list, so remove it along with its unreachable row branch.
2026-10-08 23:59:40 +02:00
Arkadiusz Fal
4770bbe3b9 Remove dead code found by Periphery on all platforms
Delete declarations that Periphery reports unused on every platform that
compiles them (iOS, macOS, tvOS), including nine views used only by their
own previews. Platform-gated code still used on another platform, device-
only MPV render paths, migration models, CloudKit record names, App
Intents metadata and unused parameters are kept.
2026-10-08 23:57:56 +02:00
Arkadiusz Fal
45e19e6536 Open more YouTube link types and playlists from links
Route YouTube search results links to search and nocookie embeds to the
video, match YouTube hosts exactly, and report YouTube pages without a
video as unsupported instead of sending them to yt-dlp. A watch link
inside a playlist shows both the video and the playlist when loaded, and
plays the video with the playlist queued around it. URL scheme play,
queue and bookmark actions accept playlist links.
2026-10-08 22:50:36 +02:00
Arkadiusz Fal
8a7218ed1b Show several opened links as mixed results
Load All in Open Link opens an Opened Links page that resolves each link
into a video, playlist or channel row like search results, in input
order. Video rows keep the usual context menu and swipe actions, and the
page can play, queue, bookmark or download all resolved videos.
2026-10-08 22:36:57 +02:00
Arkadiusz Fal
03be964c66 Load a single link from Open Link into its details screen
Open Link gets a Load action that resolves one link and shows its video
details page, playlist or channel screen instead of only playing or
downloading it. Play and Download stay as shortcuts for video links.
Timed links start at their timestamp from the details page, the Show
Details link action opens the details page, and a short extraction cache
avoids re-extracting the same link for details and playback.
2026-10-08 18:25:32 +02:00
Arkadiusz Fal
bc6ad55f38 Ask link action confirmations in an alert on tvOS
A tvOS sheet fills most of the screen, far too much for a two-button
question. The shared sheet host now presents link action confirmations
as an alert there, answering cancel when it goes away without a choice.
2026-10-07 23:59:44 +02:00
Arkadiusz Fal
33152f4371 Show toasts above shared sheets
A toast shown while a shared sheet was up, such as a failed link action
over Open Link, appeared behind the sheet. Sheets from .appSheetHost now
carry their own toast overlay, and only the top-most overlay of a scope
shows its toasts.
2026-10-07 23:59:43 +02:00
Arkadiusz Fal
6822d3b17d Use the channel strip when the subscriptions column is narrow
In regular width the channel sidebar took half of a narrow content
column, such as the iPhone Duo inner screen or iPad portrait with the
app sidebar open, leaving the feed unreadable. Gate the sidebar on the
column having room for its minimum width plus a 320pt feed; below that
the floating channel strip takes over, as on iPhone.
2026-10-07 23:56:51 +02:00
Arkadiusz Fal
1d961ab7c2 Host shared sheets in the tvOS player
The tvOS player covers the root view with a fullScreenCover and had no
sheet host, so global sheet requests made while it was up (link action
confirmations) were never presented and the action waited forever.
2026-10-06 23:59:11 +02:00
Arkadiusz Fal
6da1cfc614 Keep the link action confirm button on one line
"Unsubscribe" wrapped on 5.4-inch screens.
2026-10-06 23:58:02 +02:00
Arkadiusz Fal
5ae07574cb Add URL scheme actions: play, queue, download, bookmark, subscribe, player controls
yattee://play|play-next|queue|download|bookmark|subscribe|unsubscribe?url={link}
and yattee://player/play|pause|toggle|next|previous|close|seek|rate run through
one LinkActionPerformer that reports a LinkActionResult, ready for
x-callback-url. An unencoded url= keeps its own query; only the action's own
parameters end it.

Actions that change saved state ask first through a confirmation sheet
presented by the top-most sheet host, unless the new 'Run Link Actions
Without Asking' setting is on. Download skips the question when the quality
picker will show anyway. Player commands leave sheets and the player alone.
2026-10-05 23:58:43 +02:00
Arkadiusz Fal
ac9fbec255 Move Open Link's video resolving and auto-download into LinkVideoResolver
No behaviour change; URL scheme actions will reuse it.
2026-10-05 23:54:44 +02:00
Arkadiusz Fal
498a282396 Open Settings from yattee://settings
SettingsView owns its navigation stack, so pushing it onto a section's
stack rendered nothing. Select the Settings section where the layout has
one, otherwise present Home's settings sheet; open the Settings window on
macOS.
2026-10-05 23:37:14 +02:00
Arkadiusz Fal
1bb78d32bf Remove keychain provenance and identity scope simulator debug tools
Both were DEBUG-only Developer settings entries used while building
the accounts revamp and are no longer needed. The simulator's
account-sync suspension barrier in AccountSyncCoordinator existed only
to keep invented scopes away from the real zone, so it goes with it.
2026-10-05 09:01:59 +02:00
Arkadiusz Fal
cf90eb4d4e Dismiss sheets when navigation arrives from outside the app
Tapping a new-videos notification while Home's Settings sheet was up
switched to the Subscriptions feed underneath the sheet, so the app
came back still showing Settings. The existing dismissSettings() hook
was never called.

NavigationCoordinator.dismissPresentations() bumps a generation that
the main window's root sheet host and screen sheets (Home's Settings,
Remote Devices, Customize Home; Subscriptions' view options and data)
observe via .dismissesOnExternalNavigation(_:). The notification,
deep links and Handoff call it; in-app navigation and layout swaps do
not. The expanded player keeps its own sheets.

The notification also collapses the expanded player so the feed it
opens is visible.
2026-10-04 23:50:39 +02:00
Arkadiusz Fal
5f31610489 Look up the foreground scene instead of the first connected one
The swipe-action share sheet, the expanded player's safe area and the
Dynamic Island side check took connectedScenes.first, which ignores
which scene is active (on the iPhone Duo it can be the other panel's)
and presented the share sheet from the main window, behind an expanded
player.

UIApplication.foregroundWindowScene/foregroundWindow resolve the
foreground-active scene (else foreground-inactive, else any) and its
key window, the order the widescreen layout already used. The share
sheet now presents from the key window, which is the player's while it
is up. The tvOS display mode manager uses the same lookup.
2026-10-04 23:27:18 +02:00
Arkadiusz Fal
3e561cc3b5 Present error details and Open Link through the shared sheet host
Error details were declared in the video info view and the expanded
player, and Open Link three times: at the app root for deep links and
for the File menu command, and on Home. All of them are now AppSheets;
the deep link and menu requests go through the global request, so a
deep link that arrives while the player is expanded no longer opens the
sheet behind it.

The four sign-in modals that were a full-screen cover on tvOS and a
sheet elsewhere, each written out twice, use a platformSheet helper.
2026-10-04 21:04:19 +02:00
Arkadiusz Fal
e3d3809f2f Present row sheets through the shared sheet host
Each video row carried its own sheets: tappableVideo added the queue
action and resume sheets, the context menu and swipe actions added
add-to-playlist and download options, so a row could declare up to six
sheets, owned by a row that a list may recycle.

Rows now present those through the nearest sheet host, as does the
video info view's resume prompt. The queue action sheet for a tapped
description link becomes a global request instead of being declared
at both the app root and the expanded player.

Sheets take the color scheme where their host sits, so the floating
details panel's dark override no longer reaches them and the
presentationColorScheme workaround is gone.
2026-10-04 09:07:05 +02:00
Arkadiusz Fal
28a75792e8 Present shared sheets through one host per window
The add-to-playlist, download options and queue sheets were declared in
every view that could open them: the root view (twice, mirrored from
coordinator flags), the expanded player, its portrait and floating
panels, the player controls and the video info view.

AppSheet lists the shared sheets, and .appSheetHost() declares them
once. The app root and the expanded player each host them, and every
presented sheet hosts the next level. Views present through the
presentAppSheet environment action, which reaches the nearest host;
code without a view (and the expanded player itself, whose host sits
in its own body) uses PresentationRouter.request, taken by the
top-most host: the player while it is up, the root otherwise.

The mini player's queue and playlist sheets now go through the host,
replacing the isMiniPlayer*SheetPresented flags.
2026-10-03 23:45:08 +02:00
Arkadiusz Fal
c0495f3174 Show the sidebar layout on the iPhone Duo inner screen
The sidebar layout was gated on iPad idiom. It now appears wherever there
is room for it: regular width and regular height, or an iPad with
regular width (a short Stage Manager window keeps it). That covers the
Duo inner screen in both orientations, while large iPhones in landscape
and the Duo outer screen keep the tab bar. The subscriptions feed's
channel sidebar follows the same rule, and Sidebar settings are offered
on devices with a hinge.

SwiftUI's sidebarAdaptable TabView never shows a sidebar on iPhone
idiom, so the iOS sidebar layout now uses the NavigationSplitView with a
list sidebar that macOS already used, on iPad as well. The sidebar
layout shows the floating mini player instead of the tab bar accessory.
2026-10-03 23:26:15 +02:00
Arkadiusz Fal
b26b7d342f Keep navigation state in a router shared by both iOS layouts
The tab bar and sidebar layouts each kept their own navigation paths and
selection, so swapping between them (resizing an iPad Stage Manager
window across the size-class breakpoint) lost every pushed screen and
re-applied the startup tab.

NavigationRouter now holds the selected section, a typed stack per
section keyed by SidebarItem.id, the search text and the sidebar
manager. Both layouts select with SidebarItem and render the router's
state; navigate(to:) pushes onto it directly instead of going through
an observed pendingNavigation, so a request made before a layout
appears is not lost, and a destination pushed before startup keeps its
section. When a layout can't show the selection (a sidebar channel in
the tab bar, a section hidden by customization) it lands on the section
that can host it with that screen pushed first.

This also fixes keyboard section commands in the tab bar layout and the
coordinator's stale tab on iPad. AppTab, pendingNavigation,
selectedSidebarItem and the unused SheetDestination/path API are gone,
and the iOS 18 and 26.1 root views are merged into AdaptiveTabView.
2026-10-03 23:24:50 +02:00
Arkadiusz Fal
86ff0d6a9e Prefer the avfoundation audio output on iOS and macOS
AVSampleBufferAudioRenderer is the system media path, so it gets Spatial
Audio / Spatialize Stereo and head tracking, which audiounit and coreaudio
output never do. iOS now uses avfoundation,audiounit like tvOS, and all
macOS versions use avfoundation,coreaudio (previously only macOS 27+).
2026-10-03 11:33:48 +02:00
Arkadiusz Fal
8252dc0ea4 Return the tvOS details panel to the fixed Info/Comments tabs
Drop the preset-driven page list on tvOS (related, chapters, queue pages
and the Player Panels settings screen) and restore the segmented
Info/Comments picker, removing the now-unused strings.
2026-10-02 23:59:56 +02:00
Arkadiusz Fal
30bc6840ba Cap the video info thumbnail width at 500pt 2026-10-02 23:59:15 +02:00
Arkadiusz Fal
0bd39f1f23 Mention swiping the thumbnail carousel in the play tip 2026-10-02 22:22:13 +02:00
Arkadiusz Fal
55722f6942 Keep the video info carousel out of the re-identified content subtree
The content VStack was re-identified with currentVideoIndex, so every
page change recreated the thumbnail carousel and reset its offset to 0
while the index already pointed at the next video. On the iPhone Duo
exterior display the recreated scroll view could not restore its
position, leaving the first card dimmed at peek opacity. Only the
sections below the header are re-identified now, and the carousel pages
use an explicit width instead of containerRelativeFrame so paging stays
aligned when the scroll view extends under a horizontal safe area.
2026-10-02 21:00:05 +02:00