docs: document the decoder-driven canPlayType override (0.3.0.0)
README gains 1.3 and the 2.0 capability row is corrected: the old "8K HEVC decodingInfo supported:true" was only ever true for 8-bit Main. HANDOFF 18.7/18.8 record what the override does, the three verified modes, the kill switch, and what is deliberately left out (AV1, and acting on smooth:false).
This commit is contained in:
@@ -93,6 +93,41 @@ enableautobitratebitrate-Video-<true|false> = false
|
||||
|
||||
选过之后 120 秒内不再打扰(记在 sessionStorage)。
|
||||
|
||||
### 1.3 让客户端如实上报解码能力(`canPlayType` 覆盖)
|
||||
|
||||
`src/00-core.js`。解决的问题:**Jellyfin 的直连/转码决策 100% 看客户端上报的设备档案**,而 Jellyfin Web 是从 `canPlayType` 推出整个 HEVC 声明的(`browserDeviceProfile.js`):
|
||||
|
||||
```js
|
||||
if (canPlayType('video/mp4; codecs="hvc1.2.4.L183"')) {
|
||||
maxHevcLevel = 183; // level 6.1 = 8K
|
||||
hevcProfiles = 'main|main 10';
|
||||
}
|
||||
```
|
||||
|
||||
`canPlayType` 回答的是「这台机器*有没有* HEVC 解码器」,不是「能不能解 8192×4096 的 Main 10 @60fps」。所以一个只是「系统里有 HEVC 解码器」的桌面浏览器会声称支持 8K Main 10 → 服务器选 DirectPlay → 黑屏(而 OSD 压根不会创建,见 §1.2)。
|
||||
|
||||
插件的做法:
|
||||
|
||||
1. 页面加载时用 **`MediaCapabilities.decodingInfo`** 对 HEVC 各档做真机探测(每档在它对应的分辨率上测:L120→1080p30、L153→4K60、L183/L186→8K60,因为 level 字符串本身不带尺寸);
|
||||
2. 把结果回灌给 `HTMLVideoElement.prototype.canPlayType`:只有 `supported === false` 才返回 `''`,其余全部交给原生实现。
|
||||
|
||||
这样 Jellyfin Web 自己那套 `maxHevcLevel` 逻辑就会得出**准确**档案:
|
||||
|
||||
| 设备 | 结果 |
|
||||
|---|---|
|
||||
| 桌面(声称支持但实际解不动 8K Main 10) | 降到 level 153 → 8K 文件超出声明 → **服务器转码** |
|
||||
| Quest 3(真能解 8K Main 10) | 保持 ≥183 → **继续 Direct Play** |
|
||||
|
||||
**故意保守**:只有 `supported === false` 才降级。`supported:true, smooth:false` 会记录但不影响行为 —— 太贴边了,而且「声称能播结果没播出来」已经有 §1.2 的看门狗兜底。
|
||||
|
||||
出问题的逃生开关(某台设备报得离谱时用):
|
||||
|
||||
```js
|
||||
localStorage['jfvr-cpt'] = 'off'; // 然后刷新,覆盖完全不安装
|
||||
```
|
||||
|
||||
当前状态可以在诊断面板里看到(`canPlayType hook` 和 `HEVC real (decodingInfo)` 两段)。这也是 Meta 官方文档推荐的做法 —— 他们明确说「用 Media Capabilities API 探测,不要靠 UA 嗅探」。
|
||||
|
||||
---
|
||||
|
||||
## 2. Quest 3 实测数据(已用 ADB + CDP 在真机验证)
|
||||
@@ -114,10 +149,14 @@ UA Mozilla/5.0 (X11; Linux x86_64; Quest 3) ... Chrome/152 ... VR Safari/537.36
|
||||
| `XRWebGLBinding` | — | true ← 回退路径可用 |
|
||||
| `MAX_TEXTURE_SIZE` | 8192 | 8192 |
|
||||
| `MAX_RENDERBUFFER_SIZE` | 16384 | 16384 |
|
||||
| 8K HEVC `decodingInfo` | supported / powerEfficient | **supported:true, powerEfficient:true** |
|
||||
| 8K HEVC `decodingInfo` | supported / powerEfficient | **supported:true, powerEfficient:true**(仅 8-bit Main) |
|
||||
|
||||
结论:**HTTPS 下 Quest 浏览器提供全部所需 WebXR 能力,8K HEVC 走硬件解码。**
|
||||
|
||||
> ⚠️ 上面那行 `decodingInfo` 当年只测了 **8-bit Main** 的 codec string(`hev1.1.6.L183.B0`),
|
||||
> **10-bit Main 10(`hev1.2.4.L183.B0`)从来没测过**。插件现在会分档探测(见 §1.3),
|
||||
> 诊断面板里会列出 Main/Main10 × 4K/8K 的真实结果。
|
||||
|
||||
### 2.1 网络实测:HTTPS 域名在 Quest 上就是内网直连
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user