From 919dcf9a4248c10f77ec34b5fe76d4e72b209ae2 Mon Sep 17 00:00:00 2001 From: ner Date: Fri, 7 Aug 2026 15:57:26 +0300 Subject: [PATCH] fix(player): keep player hidden behind splash until buffered The vidstack UI flashed through the splash screen on play. Hide the player container with opacity while buffering (kept mounted so Safari autoplay still fires). Also drop the animated border and spinner from the splash, leaving the center-out reveal and labels. Co-Authored-By: Claude Opus 4.8 --- .../Actions/components/Player/index.tsx | 34 +++++-------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/components/Player/index.tsx b/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/components/Player/index.tsx index ea3d960..d085d9c 100644 --- a/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/components/Player/index.tsx +++ b/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/components/Player/index.tsx @@ -4,6 +4,7 @@ import { create, InstanceProps } from 'react-modal-promise'; import Player from '@/components/Preview/components/Torrents/components/Player'; import { Modal } from '@/components/ui/dialog'; import { useCanPlay, useSetCanPlay } from '@/hooks/useCanPlay'; +import { cn } from '@/lib/utils'; import { useFiles } from './useFiles'; import { useStats } from './useStats'; @@ -32,7 +33,13 @@ const showPlayerModal = create(({ onResolve, hash, backdrop, title, magnet }: Pr return (
-
+ {/* keep the player mounted (Safari needs it for autoplay) but hidden until buffering is done, + so its UI doesn't flash through the splash screen */} +
{sources && ( Download speed: {downloadSpeed || '0 B/s'}

- {/* a highlight sweeps around the block's 2px border while it preloads */} - -
)}