Address the first beta's bugs and requested changes
Startup now uses the Android iris animation, and playback can continue in a corner miniplayer while browsing (the video is drawn into a corner rectangle beneath a matching hole in the page). The player keeps the window controls, hides its chrome when the pointer leaves, and gains audio/subtitle tracks, audio sync, source bitrate and playback details in its options. Subtitles can be styled in Settings with a live preview. Categories replace Collections, the A–Z rail magnifies, descriptions expand in place, downloads can be removed in bulk, and search keeps its results while typing. Fixes scroll jank from per-card and scrolling backdrop blurs, the hidden colour wash, the cubic volume curve, loud theme music, the search focus ring, a stray nav indicator, Continue Watching previews and the TV Shows header overlap. Removes the star rating, the duplicate Settings menu entry and the server settings' Show advanced switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
be865fa992
commit
43c168da95
35 changed files with 1771 additions and 327 deletions
|
|
@ -6,7 +6,11 @@ import { Backdrop } from './Backdrop';
|
|||
import { Facts, TitleArt } from './media';
|
||||
import { Button, IconButton } from './primitives';
|
||||
import { openMenu } from './overlays';
|
||||
import { episodeLabel } from '../app/format';
|
||||
import { art, episodeLabel } from '../app/format';
|
||||
import { useServer } from '../app/session';
|
||||
|
||||
/** How long each feature shows; the dot progress animation matches it. */
|
||||
const ROTATE_MS = 8000;
|
||||
|
||||
export interface Feature {
|
||||
item: Item;
|
||||
|
|
@ -15,7 +19,7 @@ export interface Feature {
|
|||
|
||||
/**
|
||||
* The cinematic feature at the top of Home and the Discover pages. Features
|
||||
* rotate every 12 seconds while the pointer is away, crossfading artwork
|
||||
* rotate every 8 seconds while the pointer is away, crossfading artwork
|
||||
* while the copy lifts out and rises into place.
|
||||
*/
|
||||
export function Hero({ features, variant = 'home' }: { features: Feature[]; variant?: 'home' | 'section' }) {
|
||||
|
|
@ -27,10 +31,22 @@ export function Hero({ features, variant = 'home' }: { features: Feature[]; vari
|
|||
const root = useRef<HTMLElement>(null);
|
||||
const count = features.length;
|
||||
const feature = features[Math.min(index, count - 1)];
|
||||
const server = useServer();
|
||||
|
||||
// Decode the next feature's artwork ahead of time so the swap is immediate.
|
||||
const upcoming = count > 1 ? features[(index + 1) % count]?.item : undefined;
|
||||
useEffect(() => {
|
||||
const path = upcoming ? art.backdrop(upcoming) : '';
|
||||
if (!path) return;
|
||||
const img = new Image();
|
||||
img.decoding = 'async';
|
||||
img.src = server.image(path, 1600, 900);
|
||||
img.decode?.().catch(() => {});
|
||||
}, [upcoming?.id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!rotate || reduced || count < 2 || hover) return;
|
||||
const t = setTimeout(() => go(index + 1), 12000);
|
||||
const t = setTimeout(() => go(index + 1), ROTATE_MS);
|
||||
return () => clearTimeout(t);
|
||||
}, [index, rotate, reduced, count, hover]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue