Release Kaleido Desktop 0.1.0-beta.18
All checks were successful
Validate Kaleido Desktop / validate (push) Successful in 1m29s

Rebuild the Up Next screen on Kaleido's own components:
- Backdrop, colour wash, buttons and cards from the title pages; the
  credits play in a top-left frame with a matching hole in the page.
- Season and related rows use Shelf, so they scroll with side arrows
  instead of scrollbars; the season row starts at the playing episode.
- Returning to the video at the end no longer restarts the episode.
- Compact layout for short windows; Mac window buttons stay visible.
- Restore the flat Episodes and markers settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-12 12:17:52 -07:00
parent 2db7d8b272
commit 70530e30e2
12 changed files with 427 additions and 346 deletions

View file

@ -1,5 +1,15 @@
# Changelog
## 0.1.0-beta.18
A rebuilt Up Next screen that looks and works like the rest of Kaleido.
- Up Next now uses the same artwork backdrop, colour wash, buttons and cards as the title pages. The credits keep playing in the top-left corner beside the next episode, and the Play next episode button fills as the countdown runs.
- The Season and Related shows rows scroll with the side arrows, like every other row, instead of scrollbars. The season row starts at the episode you just watched.
- Click the video or press Esc to go back to the credits; at the end of an episode this no longer restarts it from the beginning.
- Up Next fits smaller windows, and the window buttons stay visible on Mac while it's open.
- Playback settings are a simple list again: Skip intros, Skip movie credits, Automatic skip delay and Autoplay next episode.
## 0.1.0-beta.17
- Fix the Up Next countdown stalling when the native video has keyboard focus instead of the webview. Count elapsed time accurately through delayed timer callbacks, and keep the countdown independent of the video's pause state, as on Android TV.

View file

@ -47,15 +47,11 @@ Playback tests change real Plex progress; resume an in-progress title near its s
position, or restore it afterwards. Selecting audio or subtitle tracks is saved to Plex
for that file.
Up Next opens at the first Plex credits marker for an episode, including after a seek;
without markers it opens at EOF. Movie-credit skipping is independent. There is one
autoplay timer, measured by elapsed time without requiring webview keyboard focus.
Mouse movement, clicks, keypresses (including Tab), and scrolling cancel it. Esc or
clicking the video returns to playback; F/F11 toggles full screen. Video hover/focus
shows only a white outline. The play button's fill is the visible countdown.
The video rectangle must follow window resizes and DPI changes and return to the full
window on dismissal, episode changes, errors, and closing. Verify those native video
transitions on a GPU-equipped machine; browser layout checks cannot prove rendering.
Up Next (`player/PostPlay.tsx`) opens at an episode's first credits marker, or at the end
without markers. The video is drawn into its top-left frame (`player_rect`) behind a
matching hole in the page; check that the two line up after resizing, changing display
scale and returning to the video. In the browser, open it from the console by setting
`postPlay: true` (with `item`, `nextUp`, `episodeContextReady`) on `__kaleido.usePlayer`.
## Diagnostics

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "kaleido-desktop",
"version": "0.1.0-beta.17",
"version": "0.1.0-beta.18",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "kaleido-desktop",
"version": "0.1.0-beta.17",
"version": "0.1.0-beta.18",
"dependencies": {
"@fontsource-variable/inter": "^5.3.0",
"@tanstack/react-query": "^5.105.0",

View file

@ -1,7 +1,7 @@
{
"name": "kaleido-desktop",
"private": true,
"version": "0.1.0-beta.17",
"version": "0.1.0-beta.18",
"type": "module",
"scripts": {
"dev": "vite",

2
src-tauri/Cargo.lock generated
View file

@ -2173,7 +2173,7 @@ dependencies = [
[[package]]
name = "kaleido"
version = "0.1.0-beta.17"
version = "0.1.0-beta.18"
dependencies = [
"fs2",
"futures-util",

View file

@ -1,6 +1,6 @@
[package]
name = "kaleido"
version = "0.1.0-beta.17"
version = "0.1.0-beta.18"
description = "Kaleido — a Plex client for Windows"
authors = ["Elijah"]
edition = "2021"

View file

@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Kaleido",
"version": "0.1.0-beta.17",
"version": "0.1.0-beta.18",
"identifier": "tv.kaleido.desktop",
"build": {
"beforeDevCommand": "npm run dev",

View file

@ -911,7 +911,7 @@ export function PlayerOverlay() {
}, [st.open, st.mini, seekStep, poke]);
// The macOS traffic lights fade with the rest of the player's chrome.
const chromeHidden = st.open && !st.mini && !visible && st.firstFrame && !st.error;
const chromeHidden = st.open && !st.mini && !st.postPlay && !visible && st.firstFrame && !st.error;
useEffect(() => {
if (!chromeHidden) return;
win.setButtonsVisible(false);

View file

@ -1,181 +1,297 @@
import { useEffect, useRef, useState, type CSSProperties } from 'react';
import { useEffect, useLayoutEffect, useRef, type CSSProperties } from 'react';
import { useQuery } from '@tanstack/react-query';
import { usePlayer } from './store';
import { mpv } from './engine';
import { isNative } from '../platform/native';
import { useSession } from '../app/session';
import { navigate } from '../app/router';
import { clock, duration, episodeLabel } from '../app/format';
import { art, clock, duration, episodeLabel } from '../app/format';
import * as api from '../plex/api';
import type { Item } from '../plex/types';
import { Backdrop } from '../ui/Backdrop';
import { Facts, TitleArt } from '../ui/media';
import { Facts, Shelf, TitleArt } from '../ui/media';
import { Artwork } from '../ui/primitives';
import { Icon } from '../ui/Icon';
import { WindowControls } from '../app/TopBar';
import { Spinner } from '../ui/primitives';
/** One Up Next screen, with a transparent opening over the native video. */
/**
* Up Next, adapted from Kaleido for Android TV: the credits keep playing in the
* top-left corner (the native video is drawn into that rectangle, with a matching
* hole in the page) beside the next episode, with the season and related shows
* below. Play next episode carries the one countdown; moving the mouse, clicking,
* scrolling or pressing a key stops it. Clicking the video, or Esc, returns to it.
*/
export function PostPlay() {
const st = usePlayer();
const item = usePlayer((s) => s.item)!;
const nextUp = usePlayer((s) => s.nextUp);
const contextReady = usePlayer((s) => s.episodeContextReady);
const fullscreen = usePlayer((s) => s.fullscreen);
const server = useSession((s) => s.server);
const root = useRef<HTMLDivElement>(null);
const video = useRef<HTMLButtonElement>(null);
const play = useRef<HTMLButtonElement>(null);
const currentEpisode = useRef<HTMLButtonElement>(null);
const [season, setSeason] = useState<Item[]>([]);
const [related, setRelated] = useState<Item[]>([]);
const [details, setDetails] = useState<Item | null>(null);
const item = st.item!;
const upcoming = details?.id === st.nextUp?.id ? details : st.nextUp;
const counting = st.countdown !== null;
// The listed episode lacks the rating and full synopsis.
const details = useQuery({
queryKey: [server?.machineId, 'item', nextUp?.id],
queryFn: () => api.metadata(server!, nextUp!.id),
enabled: !!server && !!nextUp,
staleTime: 30_000,
});
const upcoming = nextUp && details.data?.id === nextUp.id ? details.data : nextUp;
useVideoRect(root, video);
useEffect(() => {
currentEpisode.current?.scrollIntoView({ block: 'nearest', inline: 'center' });
}, [season]);
useEffect(() => {
if (!server) return;
let alive = true;
if (item.parentId) api.children(server, item.parentId).then((items) => alive && setSeason(items), () => {});
if (item.grandparentId) api.related(server, item.grandparentId).then((hubs) => {
const seen = new Set<string>([item.grandparentId]);
const shows = hubs.flatMap((h) => h.items).filter((i) => i.type === 'show' && !seen.has(i.id) && !!seen.add(i.id));
if (alive) setRelated(shows);
}, () => {});
return () => { alive = false; };
}, [server, item.id]);
useEffect(() => {
if (!server || !st.nextUp) return;
let alive = true;
api.metadata(server, st.nextUp.id).then((next) => alive && setDetails(next), () => {});
return () => { alive = false; };
}, [server, st.nextUp?.id]);
useEffect(() => {
const previous = document.activeElement as HTMLElement | null;
(play.current ?? video.current)?.focus({ preventScroll: true });
const cancel = () => {
const player = usePlayer.getState();
if (!player.postPlayDismissed) player.cancelCountdown();
};
const move = (event: MouseEvent) => {
if (event.movementX !== 0 || event.movementY !== 0) cancel();
const stop = () => {
if (usePlayer.getState().countdown !== null) usePlayer.getState().cancelCountdown();
};
// Layout changes can send a mousemove without the mouse moving.
const move = (e: MouseEvent) => (e.movementX || e.movementY) && stop();
const key = (e: KeyboardEvent) => {
cancel();
stop();
if (e.key === 'Escape' || e.key === 'Backspace') {
e.preventDefault();
e.stopImmediatePropagation();
usePlayer.getState().dismissPostPlay();
} else if (e.key === 'F11' || (e.key.toLowerCase() === 'f' && !e.ctrlKey && !e.metaKey && !e.altKey)) {
} else if (e.key === 'F11' || ((e.key === 'f' || e.key === 'F') && !e.ctrlKey && !e.metaKey && !e.altKey)) {
e.preventDefault();
usePlayer.getState().toggleFullscreen();
} else if (e.key === 'Tab') {
// Keep keyboard focus in the player, including after Shift+Tab.
const buttons = [...root.current!.querySelectorAll<HTMLButtonElement>('button:not(:disabled)')];
const first = buttons[0], last = buttons[buttons.length - 1];
if (e.shiftKey && document.activeElement === first) { e.preventDefault(); last?.focus(); }
else if (!e.shiftKey && document.activeElement === last) { e.preventDefault(); first?.focus(); }
}
};
const opts = { capture: true, passive: true };
window.addEventListener('keydown', key, true);
window.addEventListener('pointerdown', cancel, true);
window.addEventListener('mousemove', move, { capture: true, passive: true });
window.addEventListener('wheel', cancel, { capture: true, passive: true });
window.addEventListener('pointerdown', stop, opts);
window.addEventListener('mousemove', move, opts);
window.addEventListener('wheel', stop, opts);
return () => {
window.removeEventListener('keydown', key, true);
window.removeEventListener('pointerdown', cancel, true);
window.removeEventListener('mousemove', move, true);
window.removeEventListener('wheel', cancel, true);
if (previous?.isConnected) previous.focus({ preventScroll: true });
window.removeEventListener('pointerdown', stop, opts);
window.removeEventListener('mousemove', move, opts);
window.removeEventListener('wheel', stop, opts);
};
}, []);
useEffect(() => {
const el = video.current;
if (!el) return;
let frame = 0;
const backToVideo = () => usePlayer.getState().dismissPostPlay();
return (
<div className="player up-next" ref={root} role="dialog" aria-modal="true" aria-labelledby="up-next-label">
<div className="up-next-scene">{server && <Backdrop item={upcoming ?? item} className="up-next-backdrop" />}</div>
<div className="up-next-top" data-tauri-drag-region={isNative ? true : undefined}>
{!fullscreen && <WindowControls />}
</div>
<div className="up-next-head">
<div className="up-next-now">
<button ref={video} className="up-next-video" onClick={backToVideo} aria-label={`Return to ${item.title}`} />
<NowPlaying item={item} />
</div>
<div className="up-next-info">
<span className="micro" id="up-next-label">
{upcoming || !contextReady ? 'Up next' : 'More to watch'}
</span>
<TitleArt item={item} maxWidth={300} maxHeight={64} as="h2" className="up-next-logo" />
{upcoming ? (
<>
<h1>{upcoming.title}</h1>
<Facts item={{ ...upcoming, viewOffset: 0, originallyAvailableAt: '' }} withFormats={false} />
{upcoming.summary && <p className="up-next-summary">{upcoming.summary}</p>}
<PlayNext ref={play} />
</>
) : (
contextReady && <p className="up-next-summary">You’ve reached the end of this series.</p>
)}
</div>
</div>
{server && <UpNextRows item={item} nextUp={nextUp} />}
</div>
);
}
/**
* Draws the native video into the frame's rectangle and cuts the same hole in
* the page, following window resizes and display scale changes.
*/
function useVideoRect(root: React.RefObject<HTMLDivElement | null>, frame: React.RefObject<HTMLElement | null>) {
useLayoutEffect(() => {
const el = frame.current;
const page = root.current;
if (!el || !page) return;
let raf = 0;
const place = () => {
cancelAnimationFrame(frame);
frame = requestAnimationFrame(() => {
cancelAnimationFrame(raf);
raf = requestAnimationFrame(() => {
const r = el.getBoundingClientRect();
const style = root.current!.style;
for (const [key, value] of Object.entries({ x: r.x, y: r.y, w: r.width, h: r.height })) style.setProperty(`--up-video-${key}`, `${value}px`);
page.style.setProperty('--up-x', `${r.x}px`);
page.style.setProperty('--up-y', `${r.y}px`);
page.style.setProperty('--up-w', `${r.width}px`);
page.style.setProperty('--up-h', `${r.height}px`);
page.classList.add('placed');
const dpr = window.devicePixelRatio || 1;
// A pixel of overdraw on each side keeps the hole covered at any scale.
if (isNative) mpv.rect({ x: r.x * dpr - 1, y: r.y * dpr - 1, width: r.width * dpr + 2, height: r.height * dpr + 2 }).catch(() => {});
root.current!.classList.add('placed');
});
};
const observer = new ResizeObserver(place);
observer.observe(el);
const ro = new ResizeObserver(place);
ro.observe(el);
window.addEventListener('resize', place);
place();
return () => {
cancelAnimationFrame(frame);
observer.disconnect();
cancelAnimationFrame(raf);
ro.disconnect();
window.removeEventListener('resize', place);
if (isNative) mpv.rect(null).catch(() => {});
};
}, []);
}
const watch = () => {
if (st.ended) st.togglePause();
st.dismissPostPlay();
};
const choose = (episode: Item) => {
if (episode.id === item.id) watch();
else st.play(episode, { resume: true, quality: st.quality });
};
const browse = async (show: Item) => {
await st.close();
navigate({ name: 'item', id: show.id, title: show.title });
};
const rail = (label: string, items: Item[], episodes: boolean) => items.length > 0 && (
<section className="up-next-rail" aria-label={label}>
<h2>{label}</h2>
<div className="up-next-cards">
{items.map((entry) => (
<button key={entry.id} ref={entry.id === item.id ? currentEpisode : undefined} className="up-next-card" onClick={() => episodes ? choose(entry) : void browse(entry)} aria-current={entry.id === item.id ? 'true' : undefined}>
<div className="up-next-card-art">
{server && (entry.thumb || entry.art) && <img src={server.image(episodes ? entry.thumb : entry.art || entry.thumb, 360, 202)} alt="" loading="lazy" draggable={false} />}
</div>
<b>{episodes ? `${entry.index}. ${entry.title}` : entry.title}</b>
<small>{entry.id === item.id ? 'Now playing' : entry.id === st.nextUp?.id ? 'Up next' : episodes ? duration(entry.duration) : entry.year || ''}</small>
</button>
))}
</div>
</section>
);
/** Where the playing episode is, under the video. Its own subscription: position ticks re-render only this. */
function NowPlaying({ item }: { item: Item }) {
const position = usePlayer((s) => s.position);
const total = usePlayer((s) => s.duration);
return (
<div className="player up-next" ref={root} role="dialog" aria-modal="true" aria-labelledby="up-next-heading">
<div className="up-next-scene">{server && <Backdrop item={upcoming ?? item} />}</div>
{!st.fullscreen && <div className="up-next-window-controls"><WindowControls /></div>}
<div className="up-next-header" data-tauri-drag-region={isNative ? true : undefined}>
<div className="up-next-now">
<button ref={video} className="up-next-video" onClick={watch} aria-label={`Return to ${item.title}`} />
<div className="up-next-caption"><span>{episodeLabel(item)} · {item.title}</span><small>−{clock(Math.max(0, st.duration - st.position))}</small></div>
<div className="up-next-progress"><i style={{ width: `${st.duration ? Math.min(100, st.position / st.duration * 100) : 0}%` }} /></div>
</div>
<div className="up-next-details">
<span className="micro" id="up-next-heading">{upcoming || !st.episodeContextReady ? 'Up next' : 'More to watch'}</span>
<TitleArt item={item} maxWidth={280} maxHeight={52} as="h2" />
{upcoming ? <>
<h1>{upcoming.title}</h1>
<Facts item={{ ...upcoming, viewOffset: 0, originallyAvailableAt: '' }} withFormats={false} />
{upcoming.summary && <p className="up-next-summary">{upcoming.summary}</p>}
<div className="actions">
<button ref={play} className={`up-next-play${counting ? ' counting' : ''}`} style={{ '--p': `${counting && st.countdownTotal ? (1 - st.countdown! / st.countdownTotal) * 100 : 0}%` } as CSSProperties} onClick={() => st.playNext()}>
<span><Icon name="play" size={18} /> Play next episode</span>
</button>
</div>
</> : st.episodeContextReady ? <p className="up-next-summary">You’ve reached the end of this series.</p> : <Spinner size={24} />}
</div>
<div className="up-next-progress">
<div className="up-next-progress-text">
<span>
{episodeLabel(item)} · {item.title}
</span>
<small>−{clock(Math.max(0, total - position))}</small>
</div>
<div className="up-next-rows">
{rail(item.parentIndex ? `Season ${item.parentIndex}` : 'Episodes', season, true)}
{rail('Related shows', related, false)}
<div className="up-next-progress-bar">
<i style={{ width: `${total ? Math.min(100, (position / total) * 100) : 0}%` }} />
</div>
</div>
);
}
/** Play next episode. While autoplay counts down, a lighter fill sweeps across it. */
function PlayNext({ ref }: { ref: React.Ref<HTMLButtonElement> }) {
const countdown = usePlayer((s) => s.countdown);
const total = usePlayer((s) => s.countdownTotal);
const counting = countdown !== null && total > 0;
const fill = counting ? (1 - countdown / total) * 100 : 0;
return (
<button
ref={ref}
className={`btn primary lg up-next-play${counting ? ' counting' : ''}`}
style={{ '--fill': `${fill}%` } as CSSProperties}
onClick={() => usePlayer.getState().playNext()}
>
<Icon name="play" size={17} />
<span>Play next episode</span>
</button>
);
}
function UpNextRows({ item, nextUp }: { item: Item; nextUp: Item | null }) {
const server = useSession((s) => s.server)!;
const season = useQuery({
queryKey: [server.machineId, 'children', item.parentId],
queryFn: () => api.children(server, item.parentId),
enabled: !!item.parentId,
staleTime: 30_000,
});
const related = useQuery({
queryKey: [server.machineId, 'related', item.grandparentId],
queryFn: () => api.related(server, item.grandparentId),
enabled: !!item.grandparentId,
staleTime: 10 * 60_000,
});
const episodes = (season.data ?? []).filter((e) => e.type === 'episode');
const seen = new Set([item.grandparentId]);
const shows = (related.data ?? []).flatMap((h) => h.items).filter((i) => i.type === 'show' && !seen.has(i.id) && !!seen.add(i.id));
// The season row starts just before the playing episode.
const seasonRow = useRef<HTMLDivElement>(null);
useLayoutEffect(() => {
const row = seasonRow.current?.querySelector<HTMLElement>('.shelf');
const current = row?.querySelector<HTMLElement>('[aria-current]');
if (!row || !current) return;
const start = (current.previousElementSibling as HTMLElement | null) ?? current;
const target = row.scrollLeft + start.getBoundingClientRect().left - row.getBoundingClientRect().left - parseFloat(getComputedStyle(row).paddingLeft);
row.scrollTo({ left: target, behavior: 'instant' });
}, [episodes.length]);
const choose = (episode: Item) => {
const st = usePlayer.getState();
if (episode.id === item.id) st.dismissPostPlay();
else st.play(episode, { resume: true, quality: st.quality });
};
const browse = async (show: Item) => {
await usePlayer.getState().close();
navigate({ name: 'item', id: show.id, title: show.title });
};
if (!episodes.length && !shows.length) return null;
return (
<div className="up-next-rows">
{episodes.length > 0 && (
<div ref={seasonRow}>
<Shelf title={item.parentIndex ? `Season ${item.parentIndex}` : 'Episodes'} kind="landscape" className="up-next-shelf">
{episodes.map((ep) => (
<UpNextCard
key={ep.id}
item={ep}
current={ep.id === item.id}
caption={ep.id === item.id ? 'Now playing' : ep.id === nextUp?.id ? 'Up next' : duration(ep.duration)}
onChoose={() => choose(ep)}
/>
))}
</Shelf>
</div>
)}
{shows.length > 0 && (
<Shelf title="Related shows" kind="landscape" className="up-next-shelf">
{shows.map((show) => (
<UpNextCard key={show.id} item={show} caption={show.year ? String(show.year) : ''} onChoose={() => void browse(show)} />
))}
</Shelf>
)}
</div>
);
}
function UpNextCard({ item, caption, current, onChoose }: { item: Item; caption: string; current?: boolean; onChoose: () => void }) {
const server = useSession((s) => s.server)!;
const episode = item.type === 'episode';
const title = episode ? `${item.index}. ${item.title}` : item.title;
const progress = episode && !current && item.viewOffset && item.duration ? item.viewOffset / item.duration : 0;
return (
<article
className="card landscape"
role="button"
tabIndex={0}
aria-label={title}
aria-current={current || undefined}
onClick={onChoose}
onKeyDown={(e) => {
if (e.key !== 'Enter' && e.key !== ' ') return;
e.preventDefault();
onChoose();
}}
>
<div className="card-cover">
<Artwork src={server.image(art.landscape(item), 400, 225)} alt="" fallback={<span className="cover-fallback">{title}</span>} />
<div className="card-hover" />
{episode && !current && (
<div className="card-actions">
<span className="card-play" aria-hidden="true">
<Icon name="play" size={18} />
</span>
</div>
)}
{progress > 0 && (
<span className="progress-line">
<i style={{ width: `${Math.max(3, progress * 100)}%` }} />
</span>
)}
</div>
<div className="card-caption">
<div className="card-title" title={title}>
{title}
</div>
{caption && <div className="card-meta">{caption}</div>}
</div>
</article>
);
}

View file

@ -188,28 +188,22 @@ export function AppSettings({ tab }: { tab: string }) {
<Switch checked={s.hdrPassthrough} onChange={(v) => set('hdrPassthrough', v)} />
</Pref>
</SettingsSection>
<SettingsSection title="Playback behavior">
<div className="marker-preference">
<Pref label="Intros and credits" description="Episode credits open Up Next as they begin. These skip choices apply to intros and movie credits.">
<div className="marker-controls" role="group" aria-label="Intros and credits">
<div className="marker-control">
<span>Intros</span>
<Select label="Skip intros" value={s.skipIntro} onChange={(v) => set('skipIntro', v)} options={skipOptions} />
</div>
<div className="marker-control">
<span>Movie credits</span>
<Select label="Skip movie credits" value={s.skipCredits} onChange={(v) => set('skipCredits', v)} options={skipOptions} />
</div>
{(s.skipIntro === 'auto' || s.skipCredits === 'auto') && (
<div className="marker-control">
<span>Skip delay</span>
<Select label="Automatic skip delay" value={s.autoSkipDelay} onChange={(v) => set('autoSkipDelay', v)} options={[0, 3, 5, 10].map((v) => ({ value: v, label: v ? `${v} seconds` : 'Immediately' }))} />
</div>
)}
</div>
</Pref>
</div>
<Pref label="Autoplay next episode" description="Move the mouse or press any key in Up Next to cancel.">
<SettingsSection title="Episodes and markers" description="Intro and credits markers come from your Plex server’s analysis.">
<Pref label="Skip intros">
<Select value={s.skipIntro} onChange={(v) => set('skipIntro', v)} options={skipOptions} />
</Pref>
<Pref label="Skip movie credits" description="Episodes open Up Next when their credits begin.">
<Select value={s.skipCredits} onChange={(v) => set('skipCredits', v)} options={skipOptions} />
</Pref>
<Pref label="Automatic skip delay" description="How long the button counts down before skipping automatically. Pause, seek or press any key to keep watching instead.">
<Select
value={s.autoSkipDelay}
disabled={s.skipIntro !== 'auto' && s.skipCredits !== 'auto'}
onChange={(v) => set('autoSkipDelay', v)}
options={[0, 3, 5, 10].map((v) => ({ value: v, label: v ? `${v} seconds` : 'Skip straight away' }))}
/>
</Pref>
<Pref label="Autoplay next episode">
<Select
label="Autoplay next episode"
value={s.autoplayNext ? s.countdownSeconds : 0}

View file

@ -704,252 +704,240 @@ html.os-macos:not(.window-fullscreen) .player-top {
.skip-button > * {
position: relative;
}
/* Up Next keeps a stationary opening over the native video;
only the rows scroll. */
/* —— Up Next ————————————————————————————————————————————————————————
The credits keep playing in the top-left frame: the native video is drawn
into its rectangle and the scene has a matching hole (PostPlay.tsx). Only
the rows scroll, so the frame never moves. */
.up-next {
display: flex;
flex-direction: column;
--up-gutter: clamp(28px, 4vw, 64px);
--up-top: 44px;
--up-video-w: clamp(320px, 34vw, 640px);
}
html.os-macos:not(.window-fullscreen) .up-next {
--up-top: 64px;
}
.up-next-scene {
position: absolute;
inset: 0;
overflow: hidden;
isolation: isolate;
background: var(--bg);
pointer-events: none;
}
/* Up Next places copy on the right as well as the left. Keep every part of
the artwork dark enough for text, including with the colour wash enabled.
This layer shares the scene's video cutout, so it never dims the credits. */
.up-next-scene::after {
content: '';
position: absolute;
inset: 0;
z-index: 1;
background: linear-gradient(180deg, rgba(9, 10, 12, 0.76), rgba(9, 10, 12, 0.9));
}
.up-next.placed .up-next-scene {
-webkit-mask-image: linear-gradient(#000 0 0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 90'%3E%3Crect width='160' height='90' rx='3'/%3E%3C/svg%3E");
-webkit-mask-size: 100% 100%, var(--up-video-w) var(--up-video-h);
-webkit-mask-position: 0 0, var(--up-video-x) var(--up-video-y);
-webkit-mask-image: linear-gradient(#000 0 0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 90'%3E%3Crect width='160' height='90' rx='2.4'/%3E%3C/svg%3E");
-webkit-mask-size: 100% 100%, var(--up-w) var(--up-h);
-webkit-mask-position: 0 0, var(--up-x) var(--up-y);
-webkit-mask-repeat: no-repeat;
-webkit-mask-composite: xor;
mask-composite: exclude;
}
.up-next-window-controls {
.up-next-backdrop {
height: min(78vh, 860px);
bottom: auto;
}
.backdrop-tint.up-next-backdrop {
height: 100%;
}
/* The next episode's details sit over the artwork, so it stays dimmer here
than on a title page, with or without the colour wash. */
.up-next-backdrop .backdrop-scrim,
.up-next-backdrop.washed .backdrop-scrim {
background:
linear-gradient(90deg, rgba(9, 10, 12, 0.95) 0%, rgba(9, 10, 12, 0.86) 36%, rgba(9, 10, 12, 0.6) 64%, rgba(9, 10, 12, 0.28) 100%),
linear-gradient(0deg, var(--bg) 0%, rgba(9, 10, 12, 0.6) 22%, transparent 55%);
}
.up-next-top {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 34px;
z-index: 3;
}
.up-next-top .window-controls {
position: absolute;
top: 0;
right: 0;
z-index: 2;
height: 34px;
margin: 0;
}
.up-next-header {
.up-next-top .window-controls button {
height: 34px;
color: #e4e8e9;
}
.up-next-head {
position: relative;
display: grid;
grid-template-columns: minmax(240px, 37%) minmax(0, 1fr);
gap: clamp(28px, 4vw, 64px);
padding: 36px var(--up-gutter) 26px;
z-index: 1;
flex: none;
display: flex;
align-items: flex-start;
gap: clamp(28px, 3vw, 48px);
padding: var(--up-top) var(--gutter) 30px;
animation: fade-in 320ms var(--ease);
}
.up-next-now {
min-width: 0;
flex: none;
width: var(--up-video-w);
}
.up-next-video {
display: block;
position: relative;
width: 100%;
aspect-ratio: 16 / 9;
border-radius: 8px;
outline: 1px solid #ffffff30;
outline-offset: 2px;
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
transition: box-shadow var(--t-fast);
}
.up-next-video:hover,
.up-next-video:focus-visible {
outline: 2px solid #fff;
outline-offset: 2px;
outline: none;
box-shadow: 0 0 0 2px #fff;
}
.up-next-caption {
.up-next-progress {
margin-top: 12px;
}
.up-next-progress-text {
display: flex;
justify-content: space-between;
gap: 12px;
margin: 14px 0 8px;
font-size: 12px;
color: #cbd2d4;
color: var(--muted);
}
.up-next-caption > span {
.up-next-progress-text span {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.up-next-caption small {
.up-next-progress-text small {
flex: none;
font-size: inherit;
color: var(--dim);
font-variant-numeric: tabular-nums;
}
.up-next-progress {
.up-next-video:hover + .up-next-progress .up-next-progress-text span {
color: #fff;
}
.up-next-progress-bar {
height: 3px;
border-radius: 2px;
background: #ffffff25;
margin-top: 8px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.22);
overflow: hidden;
}
.up-next-progress i {
.up-next-progress-bar i {
display: block;
height: 100%;
background: var(--accent);
}
.up-next-details {
.up-next-info {
flex: 1;
min-width: 0;
align-self: center;
max-width: 680px;
padding-top: 6px;
text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}
.up-next-details .micro {
.up-next-info .micro {
display: block;
margin-bottom: 10px;
color: #c3cbcd;
margin-bottom: 12px;
}
.up-next-details .facts {
color: #d0d6d8;
.up-next-info .up-next-logo {
margin-bottom: 14px;
}
.up-next-details .title-art {
margin-bottom: 10px;
.up-next-info .title-text {
font-size: clamp(26px, 2.4vw, 36px);
margin-bottom: 12px;
}
.up-next-details .title-text {
.up-next-info h1 {
margin: 0 0 10px;
font-size: clamp(24px, 2.4vw, 34px);
line-height: 1.1;
}
.up-next-details h1 {
margin: 10px 0;
font-size: clamp(22px, 2vw, 30px);
font-size: clamp(20px, 1.7vw, 26px);
line-height: 1.2;
letter-spacing: -.025em;
letter-spacing: -0.025em;
font-weight: 680;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.up-next-summary {
color: #d6dcde;
margin: 14px 0 0;
color: #d0d5d8;
font-size: 14px;
line-height: 1.65;
margin: 12px 0 18px;
line-height: 1.62;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
max-width: 720px;
}
/* The countdown: a lighter fill sweeps across the button, without numbers. */
.up-next-play {
position: relative;
overflow: hidden;
min-height: 42px;
padding: 0 20px;
border-radius: 6px;
background: #eee;
color: #101214;
font-size: 13px;
font-weight: 650;
isolation: isolate;
margin-top: 22px;
text-shadow: none;
}
.up-next-play.counting {
background: #999;
.up-next-play.counting,
.up-next-play.counting:hover:not(:disabled) {
background: #a3a8a9;
}
.up-next-play.counting::before {
content: '';
position: absolute;
inset: 0 auto 0 0;
width: var(--p);
background: #f4f4f4;
transition: width 60ms linear;
z-index: -1;
width: var(--fill);
background: #f6f7f7;
}
.up-next-play > span {
position: relative;
display: flex;
align-items: center;
gap: 8px;
}
.up-next-play:hover {
box-shadow: 0 0 0 2px #ffffff40;
}
.up-next-rows {
position: relative;
overflow-y: auto;
min-height: 0;
padding: 0 var(--up-gutter) 32px;
scrollbar-gutter: stable;
}
.up-next-rail {
margin-bottom: 24px;
}
.up-next-rail h2 {
font-size: 18px;
font-weight: 650;
margin: 0 0 14px;
}
.up-next-cards {
display: flex;
gap: 16px;
overflow-x: auto;
padding: 4px 4px 14px;
scroll-snap-type: x proximity;
}
.up-next-card {
flex: 0 0 clamp(190px, 20vw, 280px);
min-width: 0;
text-align: left;
scroll-snap-align: start;
}
.up-next-card-art {
position: relative;
background: #202427;
aspect-ratio: 16 / 9;
border-radius: 7px;
overflow: hidden;
outline: 1px solid #ffffff15;
}
.up-next-card-art img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 180ms;
}
.up-next-card:hover .up-next-card-art,
.up-next-card:focus-visible .up-next-card-art {
outline: 2px solid #fff;
outline-offset: 2px;
}
.up-next-card > b {
display: block;
font-size: 12px;
font-weight: 550;
margin-top: 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.up-next-card > small {
display: block;
margin-top: 5px;
font-size: 11px;
color: #aeb8bb;
}
.up-next button:focus-visible {
.up-next-play:focus-visible {
outline: 2px solid #fff;
outline-offset: 3px;
}
@media (max-height: 720px) {
.up-next-header {
grid-template-columns: minmax(220px, 32%) minmax(0, 1fr);
gap: 28px;
padding-top: 30px;
padding-bottom: 22px;
.up-next-rows {
position: relative;
z-index: 1;
flex: 1;
min-height: 0;
overflow-x: hidden;
overflow-y: auto;
padding-bottom: 12px;
animation: fade-in 420ms var(--ease);
}
.up-next-shelf {
margin-bottom: 22px;
}
.up-next-shelf .shelf .card.landscape {
width: clamp(200px, 15.5vw, 290px);
}
.up-next-shelf .card {
scroll-margin-left: 0;
}
@media (max-height: 760px) {
.up-next-head {
padding-bottom: 20px;
}
.up-next-details .title-art {
max-height: 38px;
.up-next-info .micro {
margin-bottom: 8px;
}
.up-next-details h1 {
font-size: 22px;
margin: 6px 0;
.up-next-info .up-next-logo {
height: 44px !important;
margin-bottom: 10px;
}
.up-next-info .up-next-logo img {
max-height: 44px !important;
}
.up-next-summary {
-webkit-line-clamp: 2;
margin: 8px 0 12px;
margin-top: 10px;
}
.up-next-details .micro {
margin-bottom: 6px;
.up-next-play {
margin-top: 16px;
}
.up-next-shelf {
margin-bottom: 14px;
}
}
.up-next .card:focus-visible {
outline: none;
}
.player-error {
position: absolute;

View file

@ -1152,29 +1152,6 @@ button.chip:hover {
gap: 8px;
flex: none;
}
.marker-preference .pref {
flex-direction: column;
align-items: flex-start;
gap: 14px;
}
.marker-preference .pref-control {
width: 100%;
}
.marker-controls {
display: flex;
flex-wrap: wrap;
gap: 12px 20px;
}
.marker-control {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 6px;
}
.marker-control > span {
font-size: 11.5px;
color: var(--muted);
}
.pref-input {
width: 240px;
min-height: 34px;