From 838675baa67381b5c48a042ac9a9574847e8a6b0 Mon Sep 17 00:00:00 2001 From: catShark <1716967236@qq.com> Date: Sun, 11 Oct 2026 19:19:06 +0800 Subject: [PATCH] Jellyfin Web VR plugin for Quest 3 (VR180 stereo playback) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injects a 「VR 播放」 button into Jellyfin Web's video player page and plays VR180 / VR360 stereo content on Meta Quest 3 directly in the browser, with DirectPlay 8K HEVC, in-VR subtitles and an in-VR control panel. Modules (src/, concatenated in filename order into dist/jfvr.js): 00-core.js namespace, shared state, GL helpers, layer/frame-hook registry 10-subtitles.js libass canvas -> head-locked quad layer, auto-cropped to ink, with depth/size decoupling (angular-size lock) 20-controls.js in-VR control panel: progress/seek, transport, subtitle rows, aiming beam, padlock, pure 2D canvas -> XR quad layer 30-hands.js system hand model (Three.js + generic-hand GLB) via a manually driven projection layer 90-main.js boot, XR session lifecycle, rAF broker (rAF stops during XR), input dispatch, settings panel, localStorage persistence Key on-device findings are documented in HANDOFF.md §6 and README.md addenda: requestAnimationFrame stops during an XR session, 3:2 pulldown at 90 Hz needs updateTargetFrameRate(120), libass must be resized before entering VR, a quad's local -Z is its plane normal, and hand aiming must use the gaze ray because the emulated targetRaySpace points sideways. Quest does not expose eye tracking. Docs: INTERFACES.md (module contract + addenda), README.md (measurements), HANDOFF.md (handover notes). Credentials are NOT in the repo: deploy.py reads the SSH password from the JF_PW environment variable. --- .gitignore | 20 + HANDOFF.md | 454 +++ INTERFACES.md | 734 +++++ README.md | 813 +++++ build.py | 82 + deploy.py | 149 + dist/jfvr.js | 5315 +++++++++++++++++++++++++++++++++ legacy/jfvr-mvp-v6-working.js | 1100 +++++++ quest.sh | 28 + src/00-core.js | 343 +++ src/10-subtitles.js | 1022 +++++++ src/20-controls.js | 1940 ++++++++++++ src/30-hands.js | 569 ++++ src/90-main.js | 1412 +++++++++ 14 files changed, 13981 insertions(+) create mode 100644 .gitignore create mode 100644 HANDOFF.md create mode 100644 INTERFACES.md create mode 100644 README.md create mode 100644 build.py create mode 100644 deploy.py create mode 100644 dist/jfvr.js create mode 100644 legacy/jfvr-mvp-v6-working.js create mode 100755 quest.sh create mode 100644 src/00-core.js create mode 100644 src/10-subtitles.js create mode 100644 src/20-controls.js create mode 100644 src/30-hands.js create mode 100644 src/90-main.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0c1f491 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# --- secrets (never commit) ------------------------------------------- +# Local copy of the NAS / Jellyfin credentials. The repo only carries +# placeholders; see HANDOFF.md §2.1.1. +secrets.local.md +secrets*.md + +# --- duplicate / scratch ---------------------------------------------- +# Root copy is byte-identical to legacy/jfvr-mvp-v6-working.js (which +# deploy.py --legacy actually uses), so only the legacy one is tracked. +/jfvr-mvp.js +# Temporary offline test page (fake