From 57a81c5643b557bf3cd91ebecc2edfafb36aad46 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Thu, 8 Oct 2026 19:35:47 +0200 Subject: [PATCH] fix(plex): subtitles survive hls.js and a remounted track hls.js emptied the cues of every text track on the element when a manifest loaded or the media attached, our own included, so a VTT that loaded first showed nothing for the session; its subtitle and caption controllers are no longer built. A remounted default was switched to showing by the browser after the hide had run, drawing the cues natively under ours; the hide now follows every added track and mode change. --- frontend/src/lib/hlsPort.test.ts | 42 +++++++++++++++++ frontend/src/lib/hlsPort.ts | 14 +++++- .../lib/plexPlayerHooks.subtitle.dom.test.tsx | 47 +++++++++++++++++-- frontend/src/lib/plexPlayerHooks.ts | 25 +++++++--- 4 files changed, 115 insertions(+), 13 deletions(-) create mode 100644 frontend/src/lib/hlsPort.test.ts diff --git a/frontend/src/lib/hlsPort.test.ts b/frontend/src/lib/hlsPort.test.ts new file mode 100644 index 00000000..aea69cc0 --- /dev/null +++ b/frontend/src/lib/hlsPort.test.ts @@ -0,0 +1,42 @@ +// hls.js empties the cues of every text track on the