hud-9: render native (SRT) subtitles in the HUD; stop persisting the layout override
ADDENDUM 10. Two more independent subtitle problems found on device.
1. Normal (non-ASS) subtitles never reached the HUD. Jellyfin's
htmlVideoPlayer-plugin only routes ssa/ass through SubtitlesOctopus
(`if (!['ssa','ass'].includes(codec))` -> pgssub/vobsub/custom-element/native);
subrip falls through to the browser's own TextTrack rendering, so there is no
libass canvas at all (measured with the CN SRT selected: 0 libass canvases,
0 .videoSubtitles overlays, textTracks[0] = manualTrack/mode=showing/315 cues).
No layout setting could have made that work.
updateSource() now picks the source every XR frame: the libass canvas when it
exists, otherwise the active TextTrack cue (fallback: the .videoSubtitlesInner
overlay). The native text is cleaned, wrapped and painted white-on-black into a
private 1920x1080 canvas that flows through the unchanged crop/upload/HUD path.
prepare() is skipped when there is no libass canvas. New diagnostics:
stats.subSource / stats.subNativeText, Subtitles.getSourceKind().
2. ADDENDUM 9 persisted state.subLayout, and a stale 'mono' in jfvr.settings.v1
silently forced the mono branch on the default dual-eye content (dual:false,
eyeW:4320, crop across the seam -> both eyes side by side). The override is now
per-session: not saved, not restored, 'auto' at boot.
Verified on device with hud-9:
CN_dual_eye (ass) -> subSource=libass, dual=true, eyeW=2160,
crop=[1040,768,1176,924], copyND=0.055
CN (subrip) -> subSource=native, dual=false, eyeW=1920, text="进去了呢",
crop 256x88, uploads climbing
The private cue canvas was read back and OCR'd (cue "怎么样?好好地" -> "怎么样? 好好地"),
and injecting/removing a fake libass canvas flips subSource with no errors.
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@
|
||||
|
||||
var NS = window.__JFVR = window.__JFVR || {};
|
||||
|
||||
NS.version = 'hud-8'; // hud-8 = ADDENDUM 9 (rAF broker always-on so the libass loop survives XR entry; auto dual/mono subtitle layout)
|
||||
NS.version = 'hud-9'; // hud-9 = ADDENDUM 10 (native/TextTrack subtitles painted by the HUD; layout override per-session, ADDENDUM 9 rAF broker + auto dual/mono layout)
|
||||
NS.__core = true;
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
|
||||
Reference in New Issue
Block a user