From fadb4f17a959d05e62f6c7bc899f0784b42b3ed7 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Thu, 8 Oct 2026 21:18:48 +0200 Subject: [PATCH] fix(plex): subtitles draw only the player's own track, lifted in the player's own pixels A direct-played file's own subtitle stream (WebKit lists an mp4's mov_text) was switched to hidden and drawn under any choice, Off included: only the player's is kept hidden and read, other subtitle tracks are switched off. The lift was measured in screen pixels and applied inside the x1.25 windowed player, and re-measured off a box carrying its own (or a mid-slide) transform: an untransformed outer box is measured, the distance divided by the scale, and a cue that just appeared is placed, not slid from where the last one was left. --- .../src/components/PlexSubtitles.dom.test.tsx | 119 ++++++++++++++---- frontend/src/components/PlexSubtitles.tsx | 58 +++++---- .../lib/plexPlayerHooks.subtitle.dom.test.tsx | 34 ++++- frontend/src/lib/plexPlayerHooks.ts | 36 +++--- frontend/src/lib/plexSubTracks.ts | 6 + 5 files changed, 191 insertions(+), 62 deletions(-) create mode 100644 frontend/src/lib/plexSubTracks.ts diff --git a/frontend/src/components/PlexSubtitles.dom.test.tsx b/frontend/src/components/PlexSubtitles.dom.test.tsx index 3c088808..55c9f66c 100644 --- a/frontend/src/components/PlexSubtitles.dom.test.tsx +++ b/frontend/src/components/PlexSubtitles.dom.test.tsx @@ -20,45 +20,80 @@ afterEach(() => { vi.restoreAllMocks(); }); -/** A