docs: record the smooth/throughput dimension (0.5.0.0)

README 1.3 now documents both blocking conditions (supported=false and
smooth=false), the pin list, and the fact that nothing is asked of the user.
HANDOFF 18.7.1 explains why smooth was deliberately left out in 0.3.0.0 and why
that was wrong: it is precisely the realistic desktop case (decoder present, 8K
too slow), and it is what this machine actually hit.
This commit is contained in:
2026-10-18 01:35:15 +08:00
parent 08cbef83a3
commit 0270cd1bc1
2 changed files with 56 additions and 18 deletions
+25 -7
View File
@@ -109,25 +109,43 @@ if (canPlayType('video/mp4; codecs="hvc1.2.4.L183"')) {
插件的做法:
1. 页面加载时用 **`MediaCapabilities.decodingInfo`** 对 HEVC 各档做真机探测(每档在它对应的分辨率上测:L120→1080p30、L153→4K60、L183/L186→8K60,因为 level 字符串本身不带尺寸);
2. 把结果回灌给 `HTMLVideoElement.prototype.canPlayType`:只有 `supported === false` 才返回 `''`,其余全部交给原生实现。
1. 页面加载时用 **`MediaCapabilities.decodingInfo`** 对 HEVC 各档做真机探测(每档在它对应的分辨率和码率上测:L120→1080p30/8Mbps、L153→4K60/20Mbps、L183/L186→8K60/30Mbps,因为 level 字符串本身不带尺寸);
2. 把结果回灌给 `HTMLVideoElement.prototype.canPlayType`。
**拦掉一档的条件有两个,都是「确定的不能」**:
| 条件 | 含义 |
|---|---|
| `supported === false` | 完全解不了这个格式 |
| `smooth === false` | 能解,但**在那种分辨率和帧率下跟不上** —— 就是「有 HEVC 解码器,但 8K 跑不动」这种桌面场景 |
只有 `powerEfficient:false`(纯软解)**本身不拦**。
这样 Jellyfin Web 自己那套 `maxHevcLevel` 逻辑就会得出**准确**档案:
| 设备 | 结果 |
|---|---|
| 桌面(声称支持但实际解不动 8K Main 10) | 降到 level 153 → 8K 文件超出声明 → **服务器转码** |
| 桌面(声称支持但实际解不动 8K Main 10) | 降到 level 153 → 8K 文件超出声明 → **服务器自动转码** |
| Quest 3(真能解 8K Main 10) | 保持 ≥183 → **继续 Direct Play** |
**故意保守**:只有 `supported === false` 才降级。`supported:true, smooth:false` 会记录但不影响行为 —— 太贴边了,而且「声称能播结果没播出来」已经有 §1.2 的看门狗兜底。
注意:这里**不问用户任何东西**。客户端如实上报,Jellyfin 在 `PlaybackInfo` 那一步自己选 Transcode —— 这正是「提示用户切码率」想要达到的目的,只是做在了正确的层。
出问题的逃生开关(某台设备报得离谱时用):
逃生开关:
```js
localStorage['jfvr-cpt'] = 'off'; // 然后刷新,覆盖完全不安装
localStorage['jfvr-cpt'] = 'off'; // 完全关掉钩子
localStorage['jfvr-cpt-keep'] = '2:183'; // 只保留某一档(单台设备误报时用,不用整个关掉)
```
当前状态可以在诊断面板里看到(`canPlayType hook` 和 `HEVC real (decodingInfo)` 两段)。这也是 Meta 官方文档推荐的做法 —— 他们明确说「用 Media Capabilities API 探测,不要靠 UA 嗅探」。
当前状态可以在诊断面板里看到,每档会写明**为什么**被拦(`unsupported` / `not-smooth`)或是否被 pin:
```
canPlayType hook : on (blocked: Main10 L6.1 (8K) (not-smooth), ...)
HEVC real (decodingInfo):
Main10 L6.1 (8K) supported=true smooth=false powerEfficient=true [8192x4096@60 30Mbps] <-- BLOCKED (not-smooth)
```
这也是 Meta 官方文档推荐的做法 —— 他们明确说「用 Media Capabilities API 探测,不要靠 UA 嗅探」。
### 1.4 「VR 播放」按钮可以拖了