mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
refactor(auto-thumbnail): [PKG-AUTO-THUMB-03] own extraction jobs and encoded URLs
This commit is contained in:
1 parent
9cd6659ab4
commit
84721f19ed
21 files changed
+2641
-154
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,36 @@
|
||||
# PKG-AUTO-THUMB-03 任务与资源所有权检查点(doing)
|
||||
|
||||
生产入口拆为index/options/session/extraction四个JS模块。入口只负责公开异步注册、
|
||||
活options和核心事件;session拥有当前任务及生成的URL,extraction只接收受保护的job
|
||||
和本次配置。新增包内ARCHITECTURE.md,严格TS及公开声明留在04,不冒充已迁移。
|
||||
|
||||
旧任务在restart/重复metadata/destroy前失效,metadata/seek/Blob迟到回调不能再写入。
|
||||
先draw有效帧再串行编码,移除空白初始encode和并发回调倒退,重复Blob回调只消费一次。
|
||||
完成后也pause/清空src/load释放decoder,最终URL保留到下一张可用图或destroy;失败保留
|
||||
此前可用预览,只收回本包URL。核心setter异常、原生media错误、缺context、draw/encode/
|
||||
null Blob都有失败归属并通过console.warn观察,公开注册Promise保持原时序和Result形状。
|
||||
|
||||
注册失败回滚监听器并保持原拒绝值;清理中pause抛错也继续后续清理。新任务先安装
|
||||
再释放旧任务,覆盖清理/参数getter/媒体getter/URL创建/宿主setter中的同步重入。
|
||||
保留十列/帧起点/比例高度/活参数/defaults/忽略height,及旧JS可转换数字字符串和
|
||||
小数number的ceil抽帧行为;非有限和无效画布维度提前终止。unsigned整数界限不代表
|
||||
完整内存预算,后续仍需审查;不会靠一个粗略限制偷偷改变可用的大图调用。
|
||||
|
||||
24项候选测试在冻结旧版2通过/22失败,源码/main/legacy各24通过;两个通过项保留旧URL
|
||||
短路及metadata时长快照,22项失败对应已修复生命周期问题。原生验证针对
|
||||
真实HTTP/video/seek/JPEG回调的destroy/restart/complete资源所有权,明确不是像素修复
|
||||
或最终核心组合。WebKit分离decoder的像素风险保持open,本任务继续doing;剩余03需
|
||||
完善隐藏渲染/精确帧时间/资源预算与进一步边界,再进入04。
|
||||
|
||||
正常包构建再生三份dist和docs/compiled副本,没有手改产物。根test:auto-thumbnail及
|
||||
test:unit接入24项候选回归,没有新依赖或版本升级。生产源码改变后的每份浏览器
|
||||
报告独立保存;此前历史像素报告不拿来充当候选像素证据。
|
||||
|
||||
见[验证](../baselines/auto-thumbnail-lifecycle-checkpoint.json)与包内维护地图。
|
||||
本地检查点提交可单独回退源码/测试/文档;若撤回实现,重新运行正常包构建。
|
||||
不推送、不发布;不将本检查点提交计为完成整个03任务。
|
||||
|
||||
最终完整CI1790项(1544单元+14工程+232基线)、339生产TS通过。最终候选各24项,
|
||||
旧版2通过/22失败;两项额外兼容回归抓住并修复本次引入的fallback提前读取和duration
|
||||
快照偏差。源码/main/legacy原生生命周期各9共27项重新通过,无重试/跳过/未处理页面错误;
|
||||
本检查点不声称像素问题已修复。
|
||||
+3
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
基线:`40fcda6a37d0049d42e49c1e64e70d4fd9ba5f7f`。总任务 222 项,范围 22 个包及工作区/示例。
|
||||
|
||||
状态:todo 97 / doing 11 / blocked 0 / done 114 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
状态:todo 96 / doing 12 / blocked 0 / done 114 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
|
||||
前置依赖是启动条件;验收是完成条件。任务可以继续拆分,但不能复用或悄悄删除旧 ID。
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
| --- | --- | --- | --- | --- | --- | --- |
|
||||
| PKG-AUTO-THUMB-01 | artplayer-plugin-auto-thumbnail<br>核对包契约与历史用法 | BASE-05 | url/width/number/scale、异步工厂和渐进缩略图更新 | 源码/声明/README/demo/发布包差异已登记;公开形状和版本范围冻结 | H | done |
|
||||
| PKG-AUTO-THUMB-02 | artplayer-plugin-auto-thumbnail<br>建立特有行为与错误测试 | PKG-AUTO-THUMB-01, ENG-03, ENG-05 | 抽帧边界、短视频、失败、连续来源和销毁中的抽帧 | 旧版本行为可重跑,成功/失败/切源/销毁有必要断言 | H | done |
|
||||
| PKG-AUTO-THUMB-03 | artplayer-plugin-auto-thumbnail<br>整理内部职责与资源 | PKG-AUTO-THUMB-02, CORE-09, CORE-19 | 隐藏 video、seek 队列、canvas 编码与 Blob URL 清理 | 结构变化和缺陷修复分开记录;原 API/事件/资源生命周期通过 | H | todo |
|
||||
| PKG-AUTO-THUMB-03 | artplayer-plugin-auto-thumbnail<br>整理内部职责与资源 | PKG-AUTO-THUMB-02, CORE-09, CORE-19 | 隐藏 video、seek 队列、canvas 编码与 Blob URL 清理 | 结构变化和缺陷修复分开记录;原 API/事件/资源生命周期通过 | H | doing |
|
||||
| PKG-AUTO-THUMB-04 | artplayer-plugin-auto-thumbnail<br>迁移自有源码和公开类型 | PKG-AUTO-THUMB-03, ENG-04, ENG-06, CORE-07 | 抽帧结果和真实异步插件返回类型兼容 | 严格类型检查、旧消费样例通过;声明路径/导出和同步异步兼容 | H | todo |
|
||||
| PKG-AUTO-THUMB-05 | artplayer-plugin-auto-thumbnail<br>验证新旧核心和组合 | PKG-AUTO-THUMB-04, CORE-22 | 旧核心/候选核心预览、多次加载无过期缩略图覆盖 | 最终核心与原支持范围核心分别通过;设备/SDK 缺证据不能标完成 | H | todo |
|
||||
| PKG-AUTO-THUMB-06 | artplayer-plugin-auto-thumbnail<br>验证分发并同步文档 | PKG-AUTO-THUMB-05, ENG-07 | auto.thumbnail.js、三种产物和内存/URL 证据 | tarball 入口/资源、类型、8082 demo 和 README 一致,有回退记录 | H | todo |
|
||||
@@ -496,6 +496,7 @@
|
||||
- PKG-AUDIO-05: [记录](changes/2026-09-12-PKG-AUDIO-05-combinations.md) [记录](baselines/audio-combinations-first.json) [记录](baselines/audio-combinations-checkpoint.json) [记录](audio-validation.md)
|
||||
- PKG-AUTO-THUMB-01: [记录](baselines/auto-thumbnail-release.json) [记录](baselines/auto-thumbnail-contract.md) [记录](changes/2026-09-13-PKG-AUTO-THUMB-01-contract.md) [记录](baselines/auto-thumbnail-contract-validation.json)
|
||||
- PKG-AUTO-THUMB-02: [记录](baselines/auto-thumbnail-failures.md) [记录](baselines/auto-thumbnail-failures-validation.json) [记录](changes/2026-09-13-PKG-AUTO-THUMB-02-failures.md)
|
||||
- PKG-AUTO-THUMB-03: [记录](changes/2026-09-13-PKG-AUTO-THUMB-03-lifecycle-checkpoint.md) [记录](baselines/auto-thumbnail-lifecycle-checkpoint.json)
|
||||
- PKG-HLS-01: [记录](baselines/hls-control-contract.md) [记录](baselines/hls-control-release.json) [记录](changes/2026-09-11-PKG-HLS-01-contract.md)
|
||||
- PKG-HLS-02: [记录](hls-validation.md) [记录](baselines/hls-sdk.json) [记录](baselines/hls-validation.json) [记录](changes/2026-09-11-PKG-HLS-02-tests.md)
|
||||
- PKG-HLS-03: [记录](changes/2026-09-12-PKG-HLS-03-modules.md) [记录](baselines/hls-modules-validation.json) [记录](hls-validation.md)
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# 进度与证据
|
||||
|
||||
## PKG-AUTO-THUMB-03 源码任务与资源所有权检查点(doing)
|
||||
|
||||
生产源码拆为index/options/session/extraction,保持异步公开注册与原有效配置语义。
|
||||
串行有效帧编码、任务取消和URL归属取代无主回调;完成/切源/destroy均回收decoder,
|
||||
失败保留此前有效预览,修复重复回调、null Blob、原生错误及宿主setter/参数getter重入。
|
||||
24项回归旧版2通过/22失败;源码/main/legacy各24通过;三份原生生命周期各9共27通过。
|
||||
提交前抓住并修复fallback提前读取和duration快照两处新增偏差,重新验证最终实现。
|
||||
完整CI1790项、339生产TS通过;本包此时仍为JS,04才迁严格TS。正常构建再生三份产物及
|
||||
docs副本,包内维护地图同步。黑帧/准确帧时间/资源预算及更多边界仍需03继续,不能将
|
||||
生命周期通过当成像素或最终核心验收。相关风险保持open,提交仅为03检查点。
|
||||
见[变更](changes/2026-09-13-PKG-AUTO-THUMB-03-lifecycle-checkpoint.md)和
|
||||
[验证](baselines/auto-thumbnail-lifecycle-checkpoint.json)。222项:114 done、12 doing、96 todo。
|
||||
|
||||
|
||||
## PKG-AUTO-THUMB-02 完成:失败回归和原生抽帧对照
|
||||
|
||||
64项旧行为测试覆盖8份冻结夹具的销毁/切源/重复metadata/逆序Blob/null Blob/
|
||||
|
||||
+10
-4
@@ -4064,11 +4064,14 @@
|
||||
"refactor/scripts/auto-thumbnail-contract.test.mjs",
|
||||
"test/auto-thumbnail.test.js",
|
||||
"refactor/baselines/auto-thumbnail-failures.md",
|
||||
"refactor/baselines/auto-thumbnail-failures-validation.json"
|
||||
"refactor/baselines/auto-thumbnail-failures-validation.json",
|
||||
"test/auto-thumbnail-lifecycle.test.js",
|
||||
"test/browser/auto-thumbnail-lifecycle.spec.js",
|
||||
"refactor/baselines/auto-thumbnail-lifecycle-checkpoint.json"
|
||||
],
|
||||
"compatibleResolution": "Cancel obsolete work and release owned resources while retaining live options and progressive usable sheet updates.",
|
||||
"closureCriteria": "Delayed callbacks, repeated metadata, switching, destroy, multiple instances and failure cleanup are reproduced then pass source/artifacts and native browser checks.",
|
||||
"workspaceState": "Task02 reproduces old failures with 64 controlled tests and native delayed JPEG callbacks. Candidate fixes, numeric validation, reentrancy and complete cleanup boundaries remain task03; status stays open."
|
||||
"workspaceState": "Task03 ownership checkpoint: 22 candidate lifecycle regressions fail on frozen source and pass on source/main/legacy; two further explicit-URL short-circuit and duration-snapshot cases preserve historical successes. Final candidate runs have 24 passing cases each; 27 native lifecycle cases verify destroy/restart/completion and URL/decoder cleanup. New index/options/session/extraction modules fix serial encoding, stale callbacks, failure cleanup and selected reentry paths. Pixel/frame correctness, resource budgets and additional boundaries remain for task03; old/final core acceptance remains task05. Risk stays open rather than claiming complete extraction repair."
|
||||
},
|
||||
{
|
||||
"id": "AUTO-THUMB-ENCODE-01",
|
||||
@@ -4086,11 +4089,14 @@
|
||||
"refactor/scripts/auto-thumbnail-contract.test.mjs",
|
||||
"test/auto-thumbnail.test.js",
|
||||
"refactor/baselines/auto-thumbnail-failures.md",
|
||||
"refactor/baselines/auto-thumbnail-failures-validation.json"
|
||||
"refactor/baselines/auto-thumbnail-failures-validation.json",
|
||||
"test/auto-thumbnail-lifecycle.test.js",
|
||||
"test/browser/auto-thumbnail-lifecycle.spec.js",
|
||||
"refactor/baselines/auto-thumbnail-lifecycle-checkpoint.json"
|
||||
],
|
||||
"compatibleResolution": "Preserve JPEG grid/time/scale while bounding jobs, sequencing valid updates and handling null Blob, invalid media and thrown callbacks.",
|
||||
"closureCriteria": "Fault controls and native valid/corrupt media prove no stale sheet replacement, leaked URLs or unhandled async callbacks; capability limitations remain explicit.",
|
||||
"workspaceState": "Task02 reproduces old failures with 64 controlled tests and native delayed JPEG callbacks. Candidate fixes, numeric validation, reentrancy and complete cleanup boundaries remain task03; status stays open."
|
||||
"workspaceState": "Task03 ownership checkpoint: 22 candidate lifecycle regressions fail on frozen source and pass on source/main/legacy; two further explicit-URL short-circuit and duration-snapshot cases preserve historical successes. Final candidate runs have 24 passing cases each; 27 native lifecycle cases verify destroy/restart/completion and URL/decoder cleanup. New index/options/session/extraction modules fix serial encoding, stale callbacks, failure cleanup and selected reentry paths. Pixel/frame correctness, resource budgets and additional boundaries remain for task03; old/final core acceptance remains task05. Risk stays open rather than claiming complete extraction repair."
|
||||
},
|
||||
{
|
||||
"id": "AUTO-THUMB-PIXEL-01",
|
||||
|
||||
+5
-2
@@ -1777,11 +1777,14 @@
|
||||
"CORE-09",
|
||||
"CORE-19"
|
||||
],
|
||||
"status": "todo",
|
||||
"status": "doing",
|
||||
"risk": "H",
|
||||
"deliverable": "隐藏 video、seek 队列、canvas 编码与 Blob URL 清理",
|
||||
"acceptance": "结构变化和缺陷修复分开记录;原 API/事件/资源生命周期通过",
|
||||
"evidence": []
|
||||
"evidence": [
|
||||
"changes/2026-09-13-PKG-AUTO-THUMB-03-lifecycle-checkpoint.md",
|
||||
"baselines/auto-thumbnail-lifecycle-checkpoint.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "PKG-AUTO-THUMB-04",
|
||||
|
||||
Reference in new issue
Block a user