mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 03:11:20 -08:00
refactor(canvas): [PKG-CANVAS-03] own media and frame lifecycle in strict TypeScript
This commit is contained in:
1 parent
e931520e66
commit
2b319109cd
29 files changed
+2015
-362
No files matched your search
@@ -0,0 +1,350 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"task": "PKG-CANVAS-03",
|
||||
"status": "done",
|
||||
"checks": [
|
||||
{
|
||||
"command": "ARTPLAYER_CANVAS_BASELINE=1 node --test test/canvas-lifecycle.test.js",
|
||||
"result": "expected historical failures",
|
||||
"tests": 24,
|
||||
"failed": 20,
|
||||
"normalControlsPassed": 4
|
||||
},
|
||||
{
|
||||
"command": "node --test test/canvas-lifecycle.test.js test/canvas.test.js refactor/scripts/canvas-contract.test.mjs",
|
||||
"result": "pass",
|
||||
"tests": 70,
|
||||
"candidate": 24,
|
||||
"historical": 33,
|
||||
"contract": 13
|
||||
},
|
||||
{
|
||||
"command": "focused eslint --no-fix",
|
||||
"result": "pass"
|
||||
},
|
||||
{
|
||||
"command": "yarn build artplayer-proxy-canvas",
|
||||
"result": "pass",
|
||||
"formats": [
|
||||
"main/es2020",
|
||||
"legacy/es2015",
|
||||
"esm/es2020"
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": "playwright test canvas.spec.js canvas-lifecycle.spec.js ambilight-proxy.spec.js ambilight-lifecycle.spec.js",
|
||||
"result": "pass",
|
||||
"tests": 87,
|
||||
"skipped": 0,
|
||||
"scope": "42 frozen historical observations +18 candidate proxy +9 Ambilight proxy/core capability +18 native Ambilight lifecycle; before final falsy-callback parity correction"
|
||||
},
|
||||
{
|
||||
"command": "playwright test canvas-lifecycle.spec.js ambilight-proxy.spec.js",
|
||||
"result": "pass",
|
||||
"tests": 27,
|
||||
"skipped": 0,
|
||||
"browsers": [
|
||||
{
|
||||
"project": "chromium",
|
||||
"version": "153.0.8010.12",
|
||||
"platform": "win32"
|
||||
},
|
||||
{
|
||||
"project": "firefox",
|
||||
"version": "155.0",
|
||||
"platform": "win32"
|
||||
},
|
||||
{
|
||||
"project": "webkit",
|
||||
"version": "26.6",
|
||||
"platform": "win32"
|
||||
}
|
||||
],
|
||||
"scope": "Final candidate source after falsy callback correction: rerun all 18 candidate proxy and 9 source-dependent composition/capability cases. Earlier unchanged 42 historical and 18 native Ambilight cases are not counted as fresh executions."
|
||||
},
|
||||
{
|
||||
"command": "yarn ci:check",
|
||||
"result": "pass",
|
||||
"tests": {
|
||||
"unit": 938,
|
||||
"engineering": 14,
|
||||
"baseline": 96,
|
||||
"mainTotal": 1048,
|
||||
"repeatedContractExecutions": 44
|
||||
},
|
||||
"strictProductionTypeScriptFiles": 284
|
||||
}
|
||||
],
|
||||
"limitations": [
|
||||
"Public declaration/import and full installed artifact validation remain tasks 04/06.",
|
||||
"Windows Playwright WebKit does not establish Safari or mobile device acceptance."
|
||||
],
|
||||
"sourceCommit": "e931520e6611a1520c70d87ed5460f11f6c13110",
|
||||
"modules": [
|
||||
"index",
|
||||
"adapter",
|
||||
"media",
|
||||
"geometry",
|
||||
"renderer",
|
||||
"scheduler"
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"file": "test/canvas-lifecycle.test.js",
|
||||
"sha256LF": "8a10d43b8af38e7eb6c447282293566e700a03ee020e5561248f775d5bc7b434"
|
||||
},
|
||||
{
|
||||
"file": "test/helpers/canvas.js",
|
||||
"sha256LF": "72a2f70eef76eb4e223f2f9092ef321b017f94ce194043e898cc24c827ac5104"
|
||||
},
|
||||
{
|
||||
"file": "test/browser/canvas-lifecycle.spec.js",
|
||||
"sha256LF": "5c50ad4f11d1df91c4247dc24c07edd2c9540e128e00fd07ee096406174512a7"
|
||||
},
|
||||
{
|
||||
"file": "test/browser/ambilight-proxy.spec.js",
|
||||
"sha256LF": "e02b1fd1f5deafeb993f4584a3bde0c42b1b7ca798665382b3861c92cd8a0f70"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-proxy-canvas/tsconfig.json",
|
||||
"sha256LF": "712a3fa32ed57692d16bf854a0e77ffaecd04236efa0f557905aab7291e0aef6"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-proxy-canvas/src/index.ts",
|
||||
"sha256LF": "ee0709df702b0773ca9bfe47dcf7ff1c010cb63f4a475ca7548c31205691b2a4"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-proxy-canvas/src/adapter.ts",
|
||||
"sha256LF": "68acf8f0a594f31df981d776099ddd97e013ba2ced6eb61c18a1a967870d5597"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-proxy-canvas/src/media.ts",
|
||||
"sha256LF": "f828c55f5fb5aad02dfd3a7bd35392ae03bb10725fa0c845932264783ddbc838"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-proxy-canvas/src/geometry.ts",
|
||||
"sha256LF": "067feae2cd568f153e44346d40c1e01fdcd9b4ed021ee29e3918c218e7bf19ac"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-proxy-canvas/src/renderer.ts",
|
||||
"sha256LF": "ba5f2f546b296cc6f688e7ac1129e89d0f64035ad1aa203cf479ff023d520a01"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-proxy-canvas/src/scheduler.ts",
|
||||
"sha256LF": "2e32a634c655bd408250f0500d7895aab3311835b89d578aad07121e727d5fc9"
|
||||
}
|
||||
],
|
||||
"artifacts": [
|
||||
{
|
||||
"file": "packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.js",
|
||||
"sha256LF": "55e1c3ca512a02ea454414734d383a1b87bb8a4e8d80e98b8ea3e80419644f02"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.legacy.js",
|
||||
"sha256LF": "0796737096eb59d0af1eb7d69859502a4e23b817471366b3922224f9bad5d97b"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.mjs",
|
||||
"sha256LF": "98ee5a30ac170913205459e2d9b85a019159f8122d225967ece0894b9fe9f010"
|
||||
},
|
||||
{
|
||||
"file": "docs/compiled/artplayer-proxy-canvas.js",
|
||||
"sha256LF": "55e1c3ca512a02ea454414734d383a1b87bb8a4e8d80e98b8ea3e80419644f02"
|
||||
},
|
||||
{
|
||||
"file": "docs/compiled/artplayer-proxy-canvas.legacy.js",
|
||||
"sha256LF": "0796737096eb59d0af1eb7d69859502a4e23b817471366b3922224f9bad5d97b"
|
||||
},
|
||||
{
|
||||
"file": "docs/compiled/artplayer-proxy-canvas.mjs",
|
||||
"sha256LF": "98ee5a30ac170913205459e2d9b85a019159f8122d225967ece0894b9fe9f010"
|
||||
}
|
||||
],
|
||||
"preservedBrowserAttempts": [
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-first-results/report.json",
|
||||
"sha256": "4a85c2084c0724d094d53c254f59bdf506c719f00d71bd808222bd368f2557f4",
|
||||
"stats": {
|
||||
"startTime": "2026-09-12T04:49:55.760Z",
|
||||
"duration": 22178.867,
|
||||
"expected": 21,
|
||||
"skipped": 0,
|
||||
"unexpected": 6,
|
||||
"flaky": 0
|
||||
},
|
||||
"resultsDirectory": "refactor/.cache/canvas03-first-results/results"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-layout-probe-results/report.json",
|
||||
"sha256": "2e92892971b83972cf63de53e3ff49de064587ea2bec228b64d4f8f394913b00",
|
||||
"stats": {
|
||||
"startTime": "2026-09-12T04:51:33.300Z",
|
||||
"duration": 4576.275,
|
||||
"expected": 0,
|
||||
"skipped": 0,
|
||||
"unexpected": 1,
|
||||
"flaky": 0
|
||||
},
|
||||
"resultsDirectory": "refactor/.cache/canvas03-layout-probe-results/results"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-second-results/report.json",
|
||||
"sha256": "b1df18b795109551918a0fe4b2cbdc833c4eeebdca7aff312d2ea95a81d92750",
|
||||
"stats": {
|
||||
"startTime": "2026-09-12T04:52:41.768Z",
|
||||
"duration": 20413.01,
|
||||
"expected": 25,
|
||||
"skipped": 0,
|
||||
"unexpected": 2,
|
||||
"flaky": 0
|
||||
},
|
||||
"resultsDirectory": "refactor/.cache/canvas03-second-results/results"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-bitmap-probe-results/report.json",
|
||||
"sha256": "210ff2eea0eab7b173a2cb8ff63ff514342fcc88f66dd3184e7faaf24c647ec3",
|
||||
"stats": {
|
||||
"startTime": "2026-09-12T04:54:33.938Z",
|
||||
"duration": 3814.563,
|
||||
"expected": 0,
|
||||
"skipped": 0,
|
||||
"unexpected": 1,
|
||||
"flaky": 0
|
||||
},
|
||||
"resultsDirectory": "refactor/.cache/canvas03-bitmap-probe-results/results"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-third-results/report.json",
|
||||
"sha256": "db4c9100a4f88710374e67554e72c0c411947dd50438948fe872b841efb4ac3c",
|
||||
"stats": {
|
||||
"startTime": "2026-09-12T04:55:24.268Z",
|
||||
"duration": 26707.128,
|
||||
"expected": 25,
|
||||
"skipped": 0,
|
||||
"unexpected": 2,
|
||||
"flaky": 0
|
||||
},
|
||||
"resultsDirectory": "refactor/.cache/canvas03-third-results/results"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-native-fallback-probe-results/report.json",
|
||||
"sha256": "19b8819931cd0b526de758ffcdda4ed57d1f0053f0d5a1a971ae4a0fa3ca2702",
|
||||
"stats": {
|
||||
"startTime": "2026-09-12T04:57:05.184Z",
|
||||
"duration": 3502.855,
|
||||
"expected": 0,
|
||||
"skipped": 0,
|
||||
"unexpected": 1,
|
||||
"flaky": 0
|
||||
},
|
||||
"resultsDirectory": "refactor/.cache/canvas03-native-fallback-probe-results/results"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-frame-count-probe-results/report.json",
|
||||
"sha256": "ea9a49f26f6df1aa681d0d9e706da03856ff98c8ca95de992556d54c6d42267f",
|
||||
"stats": {
|
||||
"startTime": "2026-09-12T04:58:06.373Z",
|
||||
"duration": 3458.946,
|
||||
"expected": 0,
|
||||
"skipped": 0,
|
||||
"unexpected": 1,
|
||||
"flaky": 0
|
||||
},
|
||||
"resultsDirectory": "refactor/.cache/canvas03-frame-count-probe-results/results"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-fourth-results/report.json",
|
||||
"sha256": "c31b99eb40330829318e172d97d67ad93f486672e1584e6bbf3061671223a06a",
|
||||
"stats": {
|
||||
"startTime": "2026-09-12T04:58:38.380Z",
|
||||
"duration": 38111.093,
|
||||
"expected": 19,
|
||||
"skipped": 0,
|
||||
"unexpected": 8,
|
||||
"flaky": 0
|
||||
},
|
||||
"resultsDirectory": "refactor/.cache/canvas03-fourth-results/results"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-fifth-results/report.json",
|
||||
"sha256": "d6dd221438e708c3f99ce17cdbd8a7d66c87bce3955efd05a3f509359d06e42c",
|
||||
"stats": {
|
||||
"startTime": "2026-09-12T05:00:10.543Z",
|
||||
"duration": 20479.555,
|
||||
"expected": 27,
|
||||
"skipped": 0,
|
||||
"unexpected": 0,
|
||||
"flaky": 0
|
||||
},
|
||||
"resultsDirectory": "refactor/.cache/canvas03-fifth-results/results"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-wide-results/report.json",
|
||||
"sha256": "410e333e89f2343ed6fe89e9b383cf67260e0a332551c537673e9b9492b2849a",
|
||||
"stats": {
|
||||
"startTime": "2026-09-12T05:02:59.019Z",
|
||||
"duration": 61692.277,
|
||||
"expected": 87,
|
||||
"skipped": 0,
|
||||
"unexpected": 0,
|
||||
"flaky": 0
|
||||
},
|
||||
"resultsDirectory": "refactor/.cache/canvas03-wide-results/results"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-final-results/report.json",
|
||||
"sha256": "5a448f03d32130b492b24211db94c360dcebf8b77d4dfab1db516b3304d03921",
|
||||
"stats": {
|
||||
"startTime": "2026-09-12T05:05:56.204Z",
|
||||
"duration": 23901.64,
|
||||
"expected": 27,
|
||||
"skipped": 0,
|
||||
"unexpected": 0,
|
||||
"flaky": 0
|
||||
},
|
||||
"resultsDirectory": "refactor/.cache/canvas03-final-results/results"
|
||||
}
|
||||
],
|
||||
"logs": [
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-before.log",
|
||||
"sha256": "e9bb781a28df272462ca86d508274dd28ba575c0829877eecc3bb249d1041cb3"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-baseline-final24.log",
|
||||
"sha256": "b3877dc5cabc1b07faec0f322a96172d4d850e11b7b59021b203f48e8491d034"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-falsy-before.log",
|
||||
"sha256": "37edde1f7b9944aebbdb33401d013d4d0ec3fd1ed84ea5275a76502816777167"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-targeted-final.log",
|
||||
"sha256": "f0816a3fa739383919c20869aa913e4624ab8deda6bfac00ea8aaa7c43118095"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-lint-final.log",
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-build-final.log",
|
||||
"sha256": "21a40f641ca7873cff075ac4b03b75a358f2436c3f08e38dc244a02e3abf82f3"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-browser-final.log",
|
||||
"sha256": "99350e3995457a42c143a7b05e3d42a21e6221031e67b5720e0ec3c9720a236e"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-browser-final27.log",
|
||||
"sha256": "fcfb0ad5e126ac601d433c160bbe1145fdaacd281ce5116d402f120cd113453e"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-ci.log",
|
||||
"sha256": "afaf0d37208af4657653c7879e5f19d4013c8c232d32aa940f5006076102edc3"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/canvas03-ci-final.log",
|
||||
"sha256": "305427e2812e64942d3bada2db7c750f8ee26879aa515c825c96e0b7efe237a8"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -13,8 +13,7 @@ play/pause、destroy前后订阅、缺context和尺寸异常;保留历史失
|
||||
03拆媒体adapter/绘制调度/订阅和所有权,04明确公共类型(尤其可选参数及canvas自有
|
||||
方法优先),05/06核验新旧核心、实际媒体/浏览器/设备/安装包和8082 demo。
|
||||
|
||||
当前已有的Ambilight代理颜色测试会直接加载proxy的src/index.js;代理迁移文件入口
|
||||
或模块拆分时必须同步改为实际候选入口加载,不能用旧dist掩盖改名或遗漏模块。
|
||||
Ambilight代理颜色测试在03同步改用实际候选入口bundle,不能用旧dist掩盖改名或遗漏模块。
|
||||
Canvas正式历史浏览器矩阵在02建立;01没有使用新浏览器结果作包整体验收。
|
||||
|
||||
01最终13项Canvas专项、7项契约索引检查与991项完整CI通过;证据见
|
||||
@@ -39,3 +38,21 @@ WebKit历史代理输出透明是明确的失败基线;测试成功表示重
|
||||
失败尝试与最终报告均保留report.json和完整results,哈希与范围见
|
||||
[02验证证据](baselines/canvas-behavior-validation.json);问题处理细节见
|
||||
[02实施记录](changes/2026-09-12-PKG-CANVAS-02-tests.md)。本任务不修改生产源码。
|
||||
|
||||
## 03 严格TS和候选生命周期
|
||||
|
||||
源码拆为六个TS模块;职责、数据流和错误边界见
|
||||
[包内架构](../packages/artplayer-proxy-canvas/ARCHITECTURE.md)。`yarn test:canvas`现在
|
||||
同时运行历史和候选测试,候选可通过ARTPLAYER_CANVAS_BASELINE=1切换冻结源码以
|
||||
证明失败来源,不能把这个变量留在正常测试环境中。
|
||||
|
||||
候选浏览器文件canvas-lifecycle.spec.js覆盖实际5.4.0/候选核心×三个引擎×三场景
|
||||
共18项:实际原始尺寸和多点像素、resize/切源、暂停seek补绘、回调销毁以及逃逸方法
|
||||
不重启资源。组合运行Ambilight的9项代理/旧核心能力对照及18项原生生命周期检查。
|
||||
所有加载均来自候选源码bundle;历史42项继续从归档/Git加载。
|
||||
|
||||
WebKit须验证intrinsic尺寸,不能仅alpha255;1px挂载曾令videoWidth/videoHeight
|
||||
也变为1。Chromium临时无首帧不宜当稳定错误,WebKit零帧计数却不能作全局绘制门槛。
|
||||
失败诊断与针对性回归见[03记录](changes/2026-09-12-PKG-CANVAS-03-lifecycle.md)和
|
||||
[03证据](baselines/canvas-lifecycle-validation.json)。04公开类型/导出和05设备、06
|
||||
完整分发/demo仍需完成;本步的strict内部类型不替代安装消费者验收。
|
||||
@@ -0,0 +1,32 @@
|
||||
# PKG-CANVAS-03 TS职责与资源修复
|
||||
|
||||
将旧单文件拆成index/adapter/media/geometry/renderer/scheduler六个严格TS模块。
|
||||
入口独占宿主订阅和回滚;其余模块只接收所需能力。公开callback、实际Canvas返回、
|
||||
Canvas自有方法优先、媒体属性转发和原始Event继续保留,公开声明/导出消费者留04。
|
||||
包内ARCHITECTURE.md记录模块地图、事件顺序、状态和维护边界。
|
||||
|
||||
绘制只允许一个挂起任务;resize合并新请求并淘汰旧结果,pause/src/load/destroy
|
||||
使旧帧失效。bitmap始终关闭,包括绘制异常与过期结果;回调销毁不再发draw/排RAF。
|
||||
延迟订阅可取消,宿主和媒体注册先记清理后执行,初始化错误及重入销毁会回滚。
|
||||
销毁后暂停/卸载底层video、解除srcObject引用但不停止用户拥有的轨道,释放Canvas
|
||||
buffer;已捕获媒体方法与setter不再重启工作。暂停seek补绘一帧,不重启连续播放。
|
||||
|
||||
真实浏览器修复过程保留失败证据:旧未挂载video在WebKit透明;接入宿主并在播放前
|
||||
挂载后可绘制。但1×1隐藏尺寸令WebKit媒体尺寸也变为1×1,因此改为原始CSS尺寸,
|
||||
并增加320×180尺寸和多点颜色断言,避免仅alpha255误判。底层video绝对定位、
|
||||
opacity0、不可聚焦/点击,不增加可见播放器。
|
||||
|
||||
切源或seeking期间未形成可用帧会暂缓绘制。Chromium首次bitmap失败时readyState4、
|
||||
currentTime0、totalVideoFrames0,独立直接绘制仍透明;WebKit却可能一直上报零帧。
|
||||
因此不能全局以帧计数阻止绘制,只在bitmap获取阶段的精确首帧InvalidStateError
|
||||
条件等待后续请求,稳定错误、drawImage错误和用户回调错误仍保持事件语义。
|
||||
|
||||
初始14项候选测试在旧源码13失败/1正常通过;随着浏览器发现继续补充回归。最终
|
||||
测试/构建/浏览器结果和输入哈希见[验证证据](../baselines/canvas-lifecycle-validation.json)。
|
||||
生命周期和像素风险在最终验证前继续open;设备、公开类型、npm消费者并未以本步代替。
|
||||
|
||||
源码复查发现可选调用callback?.会把旧JS传入false/0/空串的无回调用法改成TypeError。
|
||||
新增真实三历史实现对照后在初稿复现,恢复旧truthy guard;声明依然只承诺可选函数,
|
||||
不以严格TS为由破坏已有运行时宽容行为。最终对照与修复日志单独保留。
|
||||
|
||||
最终24项候选要求在旧源码20失败/4正常通过,候选与历史/契约共70项通过;专项lint、正式三格式构建通过。广浏览器矩阵87项通过,最后falsy修正后受影响27项重跑通过,另60项未受影响的历史/原生检查不重复计数。最终完整CI1048项通过(938单元+14工程+96基线),另44项契约重复观察,284个生产TS文件严格检查。CANVAS-LIFE-01与记录的桌面CANVAS-PIXEL-01关闭,类型/分发/设备仍待04~06。本任务done并独立本地提交,不推送/发布。
|
||||
+3
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
基线:`40fcda6a37d0049d42e49c1e64e70d4fd9ba5f7f`。总任务 221 项,范围 22 个包及工作区/示例。
|
||||
|
||||
状态:todo 124 / doing 6 / blocked 0 / done 91 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
状态:todo 123 / doing 6 / blocked 0 / done 92 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
|
||||
前置依赖是启动条件;验收是完成条件。任务可以继续拆分,但不能复用或悄悄删除旧 ID。
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
| --- | --- | --- | --- | --- | --- | --- |
|
||||
| PKG-CANVAS-01 | artplayer-proxy-canvas<br>核对包契约与历史用法 | BASE-05 | callback、canvas 原方法、转发 media 属性/方法/事件 | 源码/声明/README/demo/发布包差异已登记;公开形状和版本范围冻结 | H | done |
|
||||
| PKG-CANVAS-02 | artplayer-proxy-canvas<br>建立特有行为与错误测试 | PKG-CANVAS-01, ENG-03, ENG-05 | ready/loadeddata/canplay、play/seek、回调、resize 与销毁 | 旧版本行为可重跑,成功/失败/切源/销毁有必要断言 | H | done |
|
||||
| PKG-CANVAS-03 | artplayer-proxy-canvas<br>整理内部职责与资源 | PKG-CANVAS-02, CORE-06, CORE-11, CORE-16 | video adapter/原 canvas 方法/RAF 绘制/事件订阅分离 | 结构变化和缺陷修复分开记录;原 API/事件/资源生命周期通过 | H | todo |
|
||||
| PKG-CANVAS-03 | artplayer-proxy-canvas<br>整理内部职责与资源 | PKG-CANVAS-02, CORE-06, CORE-11, CORE-16 | video adapter/原 canvas 方法/RAF 绘制/事件订阅分离 | 结构变化和缺陷修复分开记录;原 API/事件/资源生命周期通过 | H | done |
|
||||
| PKG-CANVAS-04 | artplayer-proxy-canvas<br>迁移自有源码和公开类型 | PKG-CANVAS-03, ENG-04, ENG-06, CORE-07 | canvas 与媒体能力的精确组合类型,保持 Result | 严格类型检查、旧消费样例通过;声明路径/导出和同步异步兼容 | H | todo |
|
||||
| PKG-CANVAS-05 | artplayer-proxy-canvas<br>验证新旧核心和组合 | PKG-CANVAS-04, CORE-22 | 真实 video/canvas 绘制、字幕和 document PiP 恢复 | 最终核心与原支持范围核心分别通过;设备/SDK 缺证据不能标完成 | H | todo |
|
||||
| PKG-CANVAS-06 | artplayer-proxy-canvas<br>验证分发并同步文档 | PKG-CANVAS-05, ENG-07 | canvas.js、三种产物、调用兼容与资源证据 | tarball 入口/资源、类型、8082 demo 和 README 一致,有回退记录 | H | todo |
|
||||
@@ -508,3 +508,4 @@
|
||||
- PKG-VAST-03: [记录](changes/2026-09-12-PKG-VAST-03-lifecycle.md) [记录](baselines/vast-lifecycle-validation.json) [记录](vast-compatibility-decision.md)
|
||||
- PKG-CANVAS-01: [记录](changes/2026-09-12-PKG-CANVAS-01-contract.md) [记录](baselines/canvas-contract.md) [记录](baselines/canvas-release.json) [记录](canvas-validation.md) [记录](baselines/canvas-contract-validation.json)
|
||||
- PKG-CANVAS-02: [记录](changes/2026-09-12-PKG-CANVAS-02-tests.md) [记录](baselines/canvas-behavior-validation.json) [记录](canvas-validation.md)
|
||||
- PKG-CANVAS-03: [记录](changes/2026-09-12-PKG-CANVAS-03-lifecycle.md) [记录](baselines/canvas-lifecycle-validation.json) [记录](canvas-validation.md)
|
||||
@@ -1,5 +1,18 @@
|
||||
# 进度与证据
|
||||
|
||||
## 最新完成:Canvas-03 严格TS职责与生命周期
|
||||
|
||||
生产源码拆为入口/媒体转发/底层video所有权/尺寸/绘制/调度六个严格TS模块,修复
|
||||
过期bitmap、并发RAF、回调销毁后继续执行和订阅残留。底层video在播放前挂载,
|
||||
WebKit保留原始尺寸和多点颜色;Chromium首帧/寻址条件有精确处理。额外保留旧JS
|
||||
falsy callback行为,避免可选调用语法引入异常。24项候选要求在旧源码20失败/4正常
|
||||
通过,最终70项专项、三格式构建和1048项完整CI通过;另44项重复契约观察。
|
||||
广矩阵87项通过,最终falsy兼容修正后重跑受影响27项通过,未重复计为新增用例。
|
||||
全仓284个生产TS文件严格检查。生命周期/记录的桌面像素风险关闭,类型/两代分发与
|
||||
真实设备仍留04~06。当前221项:92 done、6 doing、123 todo。下一步Canvas-04。
|
||||
见 [本步记录](changes/2026-09-12-PKG-CANVAS-03-lifecycle.md) 和
|
||||
[验证证据](baselines/canvas-lifecycle-validation.json)。独立本地提交,无推送/发布。
|
||||
|
||||
## 最新完成:Canvas-02 历史错误与原生浏览器对照
|
||||
|
||||
33项Node回归与42项真实浏览器检查通过,就绪事件顺序、播放/暂停/seek/resize/切源
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
| AMBILIGHT-TYPE-01 | resolved / 已复现 | Ambilight declarations disagree with optional factory argument and differ across published generations | PKG-AMBILIGHT-04, PKG-AMBILIGHT-06 |
|
||||
| AMBILIGHT-DIST-01 | resolved / 已复现 | Ambilight 1.0.0 CommonJS default namespace differs from callable 1.1.0 | PKG-AMBILIGHT-04, PKG-AMBILIGHT-06 |
|
||||
| AMBILIGHT-PROXY-01 | resolved / 已复现 | Canvas proxy output pixels differ from forwarded video dimensions | PKG-AMBILIGHT-PROXY-01, PKG-AMBILIGHT-05 |
|
||||
| CANVAS-LIFE-01 | open / 已复现 | Canvas proxy pending draw, bitmap and delayed subscriptions lack terminal ownership | PKG-CANVAS-02, PKG-CANVAS-03, PKG-CANVAS-05 |
|
||||
| CANVAS-LIFE-01 | resolved / 已复现 | Canvas proxy pending draw, bitmap and delayed subscriptions lack terminal ownership | PKG-CANVAS-02, PKG-CANVAS-03, PKG-CANVAS-05 |
|
||||
| CANVAS-TYPE-01 | open / 源码/产物事实 | Canvas proxy declarations change required callback across generations and omit forwarded media capabilities | PKG-CANVAS-04, PKG-CANVAS-06 |
|
||||
| CANVAS-DIST-01 | open / 已复现 | Canvas proxy published CommonJS namespace differs from current callable export | PKG-CANVAS-04, PKG-CANVAS-06 |
|
||||
| CANVAS-PIXEL-01 | open / 已复现 | Historical Canvas proxy produces transparent frames with detached native video in tested WebKit | PKG-CANVAS-03, PKG-CANVAS-05 |
|
||||
| CANVAS-PIXEL-01 | resolved / 已复现 | Historical Canvas proxy produces transparent frames with detached native video in tested WebKit | PKG-CANVAS-03, PKG-CANVAS-05 |
|
||||
+14
-4
@@ -3351,7 +3351,7 @@
|
||||
],
|
||||
"compatibleResolution": "Reproduce pending bitmap completion and rollback/late subscription before adding explicit draw scheduling and resource ownership.",
|
||||
"closureCriteria": "Historical failures reproduced and candidate terminal/error/bitmap/real media lifecycle verified.",
|
||||
"status": "open",
|
||||
"status": "resolved",
|
||||
"evidence": [
|
||||
"refactor/baselines/canvas-contract.md",
|
||||
"refactor/baselines/canvas-release.json",
|
||||
@@ -3359,7 +3359,12 @@
|
||||
"refactor/changes/2026-09-12-PKG-CANVAS-02-tests.md",
|
||||
"refactor/baselines/canvas-behavior-validation.json"
|
||||
],
|
||||
"workspaceState": "33 historical Node checks reproduce pending bitmap, concurrent RAF, close omission, reentrant destroy and delayed/partial registration leaks; 18 real browser core/proxy combinations observe RAF continuing after destroy inside callback. Candidate fixes pending task 03."
|
||||
"workspaceState": "24 candidate assertions show historical 20 failures/4 normal controls and all pass after ownership changes. Final native 18 proxy cases across actual npm core 5.4.0/candidate and three engines verify media/source/pause/seek/callback destruction and escaped-method termination. Full device and public declaration/distribution acceptance remains tasks 04-06.",
|
||||
"resolutionEvidence": [
|
||||
"refactor/changes/2026-09-12-PKG-CANVAS-03-lifecycle.md",
|
||||
"refactor/baselines/canvas-lifecycle-validation.json"
|
||||
],
|
||||
"resolutionRationale": "24 candidate assertions show historical 20 failures/4 normal controls and all pass after ownership changes. Final native 18 proxy cases across actual npm core 5.4.0/candidate and three engines verify media/source/pause/seek/callback destruction and escaped-method termination. Full device and public declaration/distribution acceptance remains tasks 04-06."
|
||||
},
|
||||
{
|
||||
"id": "CANVAS-TYPE-01",
|
||||
@@ -3398,7 +3403,7 @@
|
||||
{
|
||||
"id": "CANVAS-PIXEL-01",
|
||||
"title": "Historical Canvas proxy produces transparent frames with detached native video in tested WebKit",
|
||||
"status": "open",
|
||||
"status": "resolved",
|
||||
"confirmation": "reproduced",
|
||||
"owners": [
|
||||
"PKG-CANVAS-03",
|
||||
@@ -3410,7 +3415,12 @@
|
||||
"refactor/changes/2026-09-12-PKG-CANVAS-02-tests.md",
|
||||
"refactor/baselines/canvas-behavior-validation.json"
|
||||
],
|
||||
"workspaceState": "All six historical WebKit proxy combinations produce alpha0 while time advances. Separate native video mounted before play yields alpha255; detached native control alpha0. Chromium/Firefox both paths yield255. These historical observations do not prove candidate fix or all Safari device behavior."
|
||||
"workspaceState": "Final native pixel cases verify original 320x180 media dimensions, multiple colors, alpha255, resize and source replacement across two cores and three engines. Backing video is mounted before play at intrinsic CSS size. Diagnostic zero-count and 1px regressions are preserved; this resolves the recorded Windows Playwright defect, not all Safari/mobile device validation.",
|
||||
"resolutionEvidence": [
|
||||
"refactor/changes/2026-09-12-PKG-CANVAS-03-lifecycle.md",
|
||||
"refactor/baselines/canvas-lifecycle-validation.json"
|
||||
],
|
||||
"resolutionRationale": "Final native pixel cases verify original 320x180 media dimensions, multiple colors, alpha255, resize and source replacement across two cores and three engines. Backing video is mounted before play at intrinsic CSS size. Diagnostic zero-count and 1px regressions are preserved; this resolves the recorded Windows Playwright defect, not all Safari/mobile device validation."
|
||||
}
|
||||
]
|
||||
}
|
||||
+6
-2
@@ -3291,11 +3291,15 @@
|
||||
"CORE-11",
|
||||
"CORE-16"
|
||||
],
|
||||
"status": "todo",
|
||||
"status": "done",
|
||||
"risk": "H",
|
||||
"deliverable": "video adapter/原 canvas 方法/RAF 绘制/事件订阅分离",
|
||||
"acceptance": "结构变化和缺陷修复分开记录;原 API/事件/资源生命周期通过",
|
||||
"evidence": []
|
||||
"evidence": [
|
||||
"changes/2026-09-12-PKG-CANVAS-03-lifecycle.md",
|
||||
"baselines/canvas-lifecycle-validation.json",
|
||||
"canvas-validation.md"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "PKG-CANVAS-04",
|
||||
|
||||
Reference in new issue
Block a user