Release Kaleido Desktop 0.1.0-beta.18
All checks were successful
Validate Kaleido Desktop / validate (push) Successful in 1m29s
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:
parent
2db7d8b272
commit
70530e30e2
12 changed files with 427 additions and 346 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -1,5 +1,15 @@
|
||||||
# Changelog
|
# 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
|
## 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.
|
- 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.
|
||||||
|
|
|
||||||
|
|
@ -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
|
position, or restore it afterwards. Selecting audio or subtitle tracks is saved to Plex
|
||||||
for that file.
|
for that file.
|
||||||
|
|
||||||
Up Next opens at the first Plex credits marker for an episode, including after a seek;
|
Up Next (`player/PostPlay.tsx`) opens at an episode's first credits marker, or at the end
|
||||||
without markers it opens at EOF. Movie-credit skipping is independent. There is one
|
without markers. The video is drawn into its top-left frame (`player_rect`) behind a
|
||||||
autoplay timer, measured by elapsed time without requiring webview keyboard focus.
|
matching hole in the page; check that the two line up after resizing, changing display
|
||||||
Mouse movement, clicks, keypresses (including Tab), and scrolling cancel it. Esc or
|
scale and returning to the video. In the browser, open it from the console by setting
|
||||||
clicking the video returns to playback; F/F11 toggles full screen. Video hover/focus
|
`postPlay: true` (with `item`, `nextUp`, `episodeContextReady`) on `__kaleido.usePlayer`.
|
||||||
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.
|
|
||||||
|
|
||||||
## Diagnostics
|
## Diagnostics
|
||||||
|
|
||||||
|
|
|
||||||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "kaleido-desktop",
|
"name": "kaleido-desktop",
|
||||||
"version": "0.1.0-beta.17",
|
"version": "0.1.0-beta.18",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "kaleido-desktop",
|
"name": "kaleido-desktop",
|
||||||
"version": "0.1.0-beta.17",
|
"version": "0.1.0-beta.18",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource-variable/inter": "^5.3.0",
|
"@fontsource-variable/inter": "^5.3.0",
|
||||||
"@tanstack/react-query": "^5.105.0",
|
"@tanstack/react-query": "^5.105.0",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "kaleido-desktop",
|
"name": "kaleido-desktop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.0-beta.17",
|
"version": "0.1.0-beta.18",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|
|
||||||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
|
|
@ -2173,7 +2173,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kaleido"
|
name = "kaleido"
|
||||||
version = "0.1.0-beta.17"
|
version = "0.1.0-beta.18"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fs2",
|
"fs2",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "kaleido"
|
name = "kaleido"
|
||||||
version = "0.1.0-beta.17"
|
version = "0.1.0-beta.18"
|
||||||
description = "Kaleido — a Plex client for Windows"
|
description = "Kaleido — a Plex client for Windows"
|
||||||
authors = ["Elijah"]
|
authors = ["Elijah"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "Kaleido",
|
"productName": "Kaleido",
|
||||||
"version": "0.1.0-beta.17",
|
"version": "0.1.0-beta.18",
|
||||||
"identifier": "tv.kaleido.desktop",
|
"identifier": "tv.kaleido.desktop",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "npm run dev",
|
"beforeDevCommand": "npm run dev",
|
||||||
|
|
|
||||||
|
|
@ -911,7 +911,7 @@ export function PlayerOverlay() {
|
||||||
}, [st.open, st.mini, seekStep, poke]);
|
}, [st.open, st.mini, seekStep, poke]);
|
||||||
|
|
||||||
// The macOS traffic lights fade with the rest of the player's chrome.
|
// 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(() => {
|
useEffect(() => {
|
||||||
if (!chromeHidden) return;
|
if (!chromeHidden) return;
|
||||||
win.setButtonsVisible(false);
|
win.setButtonsVisible(false);
|
||||||
|
|
|
||||||
|
|
@ -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 { usePlayer } from './store';
|
||||||
import { mpv } from './engine';
|
import { mpv } from './engine';
|
||||||
import { isNative } from '../platform/native';
|
import { isNative } from '../platform/native';
|
||||||
import { useSession } from '../app/session';
|
import { useSession } from '../app/session';
|
||||||
import { navigate } from '../app/router';
|
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 * as api from '../plex/api';
|
||||||
import type { Item } from '../plex/types';
|
import type { Item } from '../plex/types';
|
||||||
import { Backdrop } from '../ui/Backdrop';
|
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 { Icon } from '../ui/Icon';
|
||||||
import { WindowControls } from '../app/TopBar';
|
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() {
|
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 server = useSession((s) => s.server);
|
||||||
const root = useRef<HTMLDivElement>(null);
|
const root = useRef<HTMLDivElement>(null);
|
||||||
const video = useRef<HTMLButtonElement>(null);
|
const video = useRef<HTMLButtonElement>(null);
|
||||||
const play = useRef<HTMLButtonElement>(null);
|
const play = useRef<HTMLButtonElement>(null);
|
||||||
const currentEpisode = useRef<HTMLButtonElement>(null);
|
|
||||||
const [season, setSeason] = useState<Item[]>([]);
|
// The listed episode lacks the rating and full synopsis.
|
||||||
const [related, setRelated] = useState<Item[]>([]);
|
const details = useQuery({
|
||||||
const [details, setDetails] = useState<Item | null>(null);
|
queryKey: [server?.machineId, 'item', nextUp?.id],
|
||||||
const item = st.item!;
|
queryFn: () => api.metadata(server!, nextUp!.id),
|
||||||
const upcoming = details?.id === st.nextUp?.id ? details : st.nextUp;
|
enabled: !!server && !!nextUp,
|
||||||
const counting = st.countdown !== null;
|
staleTime: 30_000,
|
||||||
|
});
|
||||||
|
const upcoming = nextUp && details.data?.id === nextUp.id ? details.data : nextUp;
|
||||||
|
|
||||||
|
useVideoRect(root, video);
|
||||||
|
|
||||||
useEffect(() => {
|
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 });
|
(play.current ?? video.current)?.focus({ preventScroll: true });
|
||||||
const cancel = () => {
|
const stop = () => {
|
||||||
const player = usePlayer.getState();
|
if (usePlayer.getState().countdown !== null) usePlayer.getState().cancelCountdown();
|
||||||
if (!player.postPlayDismissed) player.cancelCountdown();
|
|
||||||
};
|
|
||||||
const move = (event: MouseEvent) => {
|
|
||||||
if (event.movementX !== 0 || event.movementY !== 0) cancel();
|
|
||||||
};
|
};
|
||||||
|
// Layout changes can send a mousemove without the mouse moving.
|
||||||
|
const move = (e: MouseEvent) => (e.movementX || e.movementY) && stop();
|
||||||
const key = (e: KeyboardEvent) => {
|
const key = (e: KeyboardEvent) => {
|
||||||
cancel();
|
stop();
|
||||||
if (e.key === 'Escape' || e.key === 'Backspace') {
|
if (e.key === 'Escape' || e.key === 'Backspace') {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopImmediatePropagation();
|
|
||||||
usePlayer.getState().dismissPostPlay();
|
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();
|
e.preventDefault();
|
||||||
usePlayer.getState().toggleFullscreen();
|
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('keydown', key, true);
|
||||||
window.addEventListener('pointerdown', cancel, true);
|
window.addEventListener('pointerdown', stop, opts);
|
||||||
window.addEventListener('mousemove', move, { capture: true, passive: true });
|
window.addEventListener('mousemove', move, opts);
|
||||||
window.addEventListener('wheel', cancel, { capture: true, passive: true });
|
window.addEventListener('wheel', stop, opts);
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener('keydown', key, true);
|
window.removeEventListener('keydown', key, true);
|
||||||
window.removeEventListener('pointerdown', cancel, true);
|
window.removeEventListener('pointerdown', stop, opts);
|
||||||
window.removeEventListener('mousemove', move, true);
|
window.removeEventListener('mousemove', move, opts);
|
||||||
window.removeEventListener('wheel', cancel, true);
|
window.removeEventListener('wheel', stop, opts);
|
||||||
if (previous?.isConnected) previous.focus({ preventScroll: true });
|
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
const backToVideo = () => usePlayer.getState().dismissPostPlay();
|
||||||
const el = video.current;
|
|
||||||
if (!el) return;
|
return (
|
||||||
let frame = 0;
|
<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 = () => {
|
const place = () => {
|
||||||
cancelAnimationFrame(frame);
|
cancelAnimationFrame(raf);
|
||||||
frame = requestAnimationFrame(() => {
|
raf = requestAnimationFrame(() => {
|
||||||
const r = el.getBoundingClientRect();
|
const r = el.getBoundingClientRect();
|
||||||
const style = root.current!.style;
|
page.style.setProperty('--up-x', `${r.x}px`);
|
||||||
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-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;
|
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(() => {});
|
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);
|
const ro = new ResizeObserver(place);
|
||||||
observer.observe(el);
|
ro.observe(el);
|
||||||
window.addEventListener('resize', place);
|
window.addEventListener('resize', place);
|
||||||
place();
|
place();
|
||||||
return () => {
|
return () => {
|
||||||
cancelAnimationFrame(frame);
|
cancelAnimationFrame(raf);
|
||||||
observer.disconnect();
|
ro.disconnect();
|
||||||
window.removeEventListener('resize', place);
|
window.removeEventListener('resize', place);
|
||||||
if (isNative) mpv.rect(null).catch(() => {});
|
if (isNative) mpv.rect(null).catch(() => {});
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
}
|
||||||
|
|
||||||
const watch = () => {
|
/** Where the playing episode is, under the video. Its own subscription: position ticks re-render only this. */
|
||||||
if (st.ended) st.togglePause();
|
function NowPlaying({ item }: { item: Item }) {
|
||||||
st.dismissPostPlay();
|
const position = usePlayer((s) => s.position);
|
||||||
};
|
const total = usePlayer((s) => s.duration);
|
||||||
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>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="player up-next" ref={root} role="dialog" aria-modal="true" aria-labelledby="up-next-heading">
|
<div className="up-next-progress">
|
||||||
<div className="up-next-scene">{server && <Backdrop item={upcoming ?? item} />}</div>
|
<div className="up-next-progress-text">
|
||||||
{!st.fullscreen && <div className="up-next-window-controls"><WindowControls /></div>}
|
<span>
|
||||||
<div className="up-next-header" data-tauri-drag-region={isNative ? true : undefined}>
|
{episodeLabel(item)} · {item.title}
|
||||||
<div className="up-next-now">
|
</span>
|
||||||
<button ref={video} className="up-next-video" onClick={watch} aria-label={`Return to ${item.title}`} />
|
<small>−{clock(Math.max(0, total - position))}</small>
|
||||||
<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>
|
</div>
|
||||||
<div className="up-next-rows">
|
<div className="up-next-progress-bar">
|
||||||
{rail(item.parentIndex ? `Season ${item.parentIndex}` : 'Episodes', season, true)}
|
<i style={{ width: `${total ? Math.min(100, (position / total) * 100) : 0}%` }} />
|
||||||
{rail('Related shows', related, false)}
|
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -188,28 +188,22 @@ export function AppSettings({ tab }: { tab: string }) {
|
||||||
<Switch checked={s.hdrPassthrough} onChange={(v) => set('hdrPassthrough', v)} />
|
<Switch checked={s.hdrPassthrough} onChange={(v) => set('hdrPassthrough', v)} />
|
||||||
</Pref>
|
</Pref>
|
||||||
</SettingsSection>
|
</SettingsSection>
|
||||||
<SettingsSection title="Playback behavior">
|
<SettingsSection title="Episodes and markers" description="Intro and credits markers come from your Plex server’s analysis.">
|
||||||
<div className="marker-preference">
|
<Pref label="Skip intros">
|
||||||
<Pref label="Intros and credits" description="Episode credits open Up Next as they begin. These skip choices apply to intros and movie credits.">
|
<Select value={s.skipIntro} onChange={(v) => set('skipIntro', v)} options={skipOptions} />
|
||||||
<div className="marker-controls" role="group" aria-label="Intros and credits">
|
</Pref>
|
||||||
<div className="marker-control">
|
<Pref label="Skip movie credits" description="Episodes open Up Next when their credits begin.">
|
||||||
<span>Intros</span>
|
<Select value={s.skipCredits} onChange={(v) => set('skipCredits', v)} options={skipOptions} />
|
||||||
<Select label="Skip intros" value={s.skipIntro} onChange={(v) => set('skipIntro', v)} options={skipOptions} />
|
</Pref>
|
||||||
</div>
|
<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.">
|
||||||
<div className="marker-control">
|
<Select
|
||||||
<span>Movie credits</span>
|
value={s.autoSkipDelay}
|
||||||
<Select label="Skip movie credits" value={s.skipCredits} onChange={(v) => set('skipCredits', v)} options={skipOptions} />
|
disabled={s.skipIntro !== 'auto' && s.skipCredits !== 'auto'}
|
||||||
</div>
|
onChange={(v) => set('autoSkipDelay', v)}
|
||||||
{(s.skipIntro === 'auto' || s.skipCredits === 'auto') && (
|
options={[0, 3, 5, 10].map((v) => ({ value: v, label: v ? `${v} seconds` : 'Skip straight away' }))}
|
||||||
<div className="marker-control">
|
/>
|
||||||
<span>Skip delay</span>
|
</Pref>
|
||||||
<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' }))} />
|
<Pref label="Autoplay next episode">
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</Pref>
|
|
||||||
</div>
|
|
||||||
<Pref label="Autoplay next episode" description="Move the mouse or press any key in Up Next to cancel.">
|
|
||||||
<Select
|
<Select
|
||||||
label="Autoplay next episode"
|
label="Autoplay next episode"
|
||||||
value={s.autoplayNext ? s.countdownSeconds : 0}
|
value={s.autoplayNext ? s.countdownSeconds : 0}
|
||||||
|
|
|
||||||
|
|
@ -704,252 +704,240 @@ html.os-macos:not(.window-fullscreen) .player-top {
|
||||||
.skip-button > * {
|
.skip-button > * {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
/* Up Next keeps a stationary opening over the native video;
|
/* —— Up Next ————————————————————————————————————————————————————————
|
||||||
only the rows scroll. */
|
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 {
|
.up-next {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
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 {
|
.up-next-scene {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
isolation: isolate;
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
pointer-events: none;
|
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 {
|
.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-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-video-w) var(--up-video-h);
|
-webkit-mask-size: 100% 100%, var(--up-w) var(--up-h);
|
||||||
-webkit-mask-position: 0 0, var(--up-video-x) var(--up-video-y);
|
-webkit-mask-position: 0 0, var(--up-x) var(--up-y);
|
||||||
-webkit-mask-repeat: no-repeat;
|
-webkit-mask-repeat: no-repeat;
|
||||||
-webkit-mask-composite: xor;
|
-webkit-mask-composite: xor;
|
||||||
mask-composite: exclude;
|
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;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 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;
|
position: relative;
|
||||||
display: grid;
|
z-index: 1;
|
||||||
grid-template-columns: minmax(240px, 37%) minmax(0, 1fr);
|
|
||||||
gap: clamp(28px, 4vw, 64px);
|
|
||||||
padding: 36px var(--up-gutter) 26px;
|
|
||||||
flex: none;
|
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 {
|
.up-next-now {
|
||||||
min-width: 0;
|
flex: none;
|
||||||
|
width: var(--up-video-w);
|
||||||
}
|
}
|
||||||
.up-next-video {
|
.up-next-video {
|
||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
aspect-ratio: 16 / 9;
|
aspect-ratio: 16 / 9;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
outline: 1px solid #ffffff30;
|
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
|
||||||
outline-offset: 2px;
|
transition: box-shadow var(--t-fast);
|
||||||
}
|
}
|
||||||
.up-next-video:hover,
|
.up-next-video:hover,
|
||||||
.up-next-video:focus-visible {
|
.up-next-video:focus-visible {
|
||||||
outline: 2px solid #fff;
|
outline: none;
|
||||||
outline-offset: 2px;
|
box-shadow: 0 0 0 2px #fff;
|
||||||
}
|
}
|
||||||
.up-next-caption {
|
.up-next-progress {
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
.up-next-progress-text {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
margin: 14px 0 8px;
|
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #cbd2d4;
|
color: var(--muted);
|
||||||
}
|
}
|
||||||
.up-next-caption > span {
|
.up-next-progress-text span {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
.up-next-caption small {
|
.up-next-progress-text small {
|
||||||
flex: none;
|
flex: none;
|
||||||
|
font-size: inherit;
|
||||||
|
color: var(--dim);
|
||||||
font-variant-numeric: tabular-nums;
|
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;
|
height: 3px;
|
||||||
border-radius: 2px;
|
margin-top: 8px;
|
||||||
background: #ffffff25;
|
border-radius: 3px;
|
||||||
|
background: rgba(255, 255, 255, 0.22);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.up-next-progress i {
|
.up-next-progress-bar i {
|
||||||
display: block;
|
display: block;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
}
|
}
|
||||||
.up-next-details {
|
.up-next-info {
|
||||||
|
flex: 1;
|
||||||
min-width: 0;
|
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;
|
display: block;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 12px;
|
||||||
color: #c3cbcd;
|
|
||||||
}
|
}
|
||||||
.up-next-details .facts {
|
.up-next-info .up-next-logo {
|
||||||
color: #d0d6d8;
|
margin-bottom: 14px;
|
||||||
}
|
}
|
||||||
.up-next-details .title-art {
|
.up-next-info .title-text {
|
||||||
margin-bottom: 10px;
|
font-size: clamp(26px, 2.4vw, 36px);
|
||||||
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
.up-next-details .title-text {
|
.up-next-info h1 {
|
||||||
margin: 0 0 10px;
|
margin: 0 0 10px;
|
||||||
font-size: clamp(24px, 2.4vw, 34px);
|
font-size: clamp(20px, 1.7vw, 26px);
|
||||||
line-height: 1.1;
|
|
||||||
}
|
|
||||||
.up-next-details h1 {
|
|
||||||
margin: 10px 0;
|
|
||||||
font-size: clamp(22px, 2vw, 30px);
|
|
||||||
line-height: 1.2;
|
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 {
|
.up-next-summary {
|
||||||
color: #d6dcde;
|
margin: 14px 0 0;
|
||||||
|
color: #d0d5d8;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1.65;
|
line-height: 1.62;
|
||||||
margin: 12px 0 18px;
|
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-line-clamp: 3;
|
-webkit-line-clamp: 3;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
max-width: 720px;
|
|
||||||
}
|
}
|
||||||
|
/* The countdown: a lighter fill sweeps across the button, without numbers. */
|
||||||
.up-next-play {
|
.up-next-play {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
min-height: 42px;
|
isolation: isolate;
|
||||||
padding: 0 20px;
|
margin-top: 22px;
|
||||||
border-radius: 6px;
|
text-shadow: none;
|
||||||
background: #eee;
|
|
||||||
color: #101214;
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 650;
|
|
||||||
}
|
}
|
||||||
.up-next-play.counting {
|
.up-next-play.counting,
|
||||||
background: #999;
|
.up-next-play.counting:hover:not(:disabled) {
|
||||||
|
background: #a3a8a9;
|
||||||
}
|
}
|
||||||
.up-next-play.counting::before {
|
.up-next-play.counting::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0 auto 0 0;
|
inset: 0 auto 0 0;
|
||||||
width: var(--p);
|
z-index: -1;
|
||||||
background: #f4f4f4;
|
width: var(--fill);
|
||||||
transition: width 60ms linear;
|
background: #f6f7f7;
|
||||||
}
|
}
|
||||||
.up-next-play > span {
|
.up-next-play:focus-visible {
|
||||||
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 {
|
|
||||||
outline: 2px solid #fff;
|
outline: 2px solid #fff;
|
||||||
outline-offset: 3px;
|
outline-offset: 3px;
|
||||||
}
|
}
|
||||||
@media (max-height: 720px) {
|
.up-next-rows {
|
||||||
.up-next-header {
|
position: relative;
|
||||||
grid-template-columns: minmax(220px, 32%) minmax(0, 1fr);
|
z-index: 1;
|
||||||
gap: 28px;
|
flex: 1;
|
||||||
padding-top: 30px;
|
min-height: 0;
|
||||||
padding-bottom: 22px;
|
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 {
|
.up-next-info .micro {
|
||||||
max-height: 38px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.up-next-details h1 {
|
.up-next-info .up-next-logo {
|
||||||
font-size: 22px;
|
height: 44px !important;
|
||||||
margin: 6px 0;
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.up-next-info .up-next-logo img {
|
||||||
|
max-height: 44px !important;
|
||||||
}
|
}
|
||||||
.up-next-summary {
|
.up-next-summary {
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
margin: 8px 0 12px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
.up-next-details .micro {
|
.up-next-play {
|
||||||
margin-bottom: 6px;
|
margin-top: 16px;
|
||||||
}
|
}
|
||||||
|
.up-next-shelf {
|
||||||
|
margin-bottom: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.up-next .card:focus-visible {
|
||||||
|
outline: none;
|
||||||
}
|
}
|
||||||
.player-error {
|
.player-error {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -1152,29 +1152,6 @@ button.chip:hover {
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
flex: none;
|
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 {
|
.pref-input {
|
||||||
width: 240px;
|
width: 240px;
|
||||||
min-height: 34px;
|
min-height: 34px;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue