mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-18 02:21:20 -08:00
test(ambilight): [PKG-AMBILIGHT-01] freeze actual release and invocation contracts
This commit is contained in:
1 parent
c57c7e4b16
commit
06032a6906
17 files changed
+638
-7
No files matched your search
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"task": "PKG-AMBILIGHT-01",
|
||||
"status": "done",
|
||||
"sourceCommit": "c57c7e4b164557d111bb92a9df17c2f28d2ee657",
|
||||
"checks": [
|
||||
{
|
||||
"command": "node --test refactor/scripts/ambilight-contract.test.mjs refactor/scripts/contracts.test.mjs",
|
||||
"result": "pass",
|
||||
"tests": 14,
|
||||
"ambilightTests": 7,
|
||||
"indexTests": 7,
|
||||
"log": "refactor/.cache/ambilight-contract-final.log"
|
||||
},
|
||||
{
|
||||
"command": "eslint Ambilight helper/contract scripts and updated contracts test --no-fix",
|
||||
"result": "pass",
|
||||
"log": "refactor/.cache/ambilight-lint-final.log"
|
||||
},
|
||||
{
|
||||
"command": "yarn ci:check",
|
||||
"result": "pass",
|
||||
"tests": {
|
||||
"unit": 832,
|
||||
"engineering": 14,
|
||||
"baseline": 79,
|
||||
"mainTotal": 925,
|
||||
"repeatedContractExecutions": 44
|
||||
},
|
||||
"log": "refactor/.cache/ambilight01-ci.log"
|
||||
}
|
||||
],
|
||||
"logs": [
|
||||
{
|
||||
"file": "refactor/.cache/ambilight-contract-final.log",
|
||||
"sha256": "a28f0c8a6b8b087174aeb39b1cb1ea3c792ed25fef86e8f636ffdb2349652177"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/ambilight-lint-final.log",
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/ambilight01-ci.log",
|
||||
"sha256": "71fd0363f2e34df800730bdf5fc6e9d1c40819ae119f83ce9c5add3310b91ec2"
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"file": "refactor/scripts/ambilight-contract.mjs",
|
||||
"sha256LF": "50cd644d2715812ae57fad7e8babab85269b8693fddd6a7600fd4e3446927867"
|
||||
},
|
||||
{
|
||||
"file": "refactor/scripts/ambilight-contract.test.mjs",
|
||||
"sha256LF": "38b626131836a6087efb9bccdff8f46e907ed54d064fbcb4927d931ac39bb9d3"
|
||||
},
|
||||
{
|
||||
"file": "test/helpers/ambilight.js",
|
||||
"sha256LF": "7775f147355d2aa08615a82079760924ae151beb7d9bdc94cccfd8195f5b19d8"
|
||||
},
|
||||
{
|
||||
"file": "refactor/contract-policy.json",
|
||||
"sha256LF": "3da55d2e6e656831f2cc63678e8b78c9499640d8471463afd48369a02148aeaf"
|
||||
},
|
||||
{
|
||||
"file": "refactor/scripts/contracts.test.mjs",
|
||||
"sha256LF": "1db5b256464bf17e969070375558c6ff854f116a57e5283b04e9c1327dd9c1e3"
|
||||
}
|
||||
],
|
||||
"limitations": [
|
||||
"Node-controlled Canvas/RAF is not real browser/media validation",
|
||||
"Declarations inspected, not full installed compiler acceptance",
|
||||
"Git core association is not a supported version interval",
|
||||
"Lifecycle issues remain source observations until PKG-AMBILIGHT-02 reproduces them",
|
||||
"No production source/type/artifact changes or remote publish"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
# Ambilight 实际发布与工作区契约
|
||||
|
||||
PKG-AMBILIGHT-01;来源c57c7e4b。实际npm有1.0.0、1.1.0,后者为采集时latest。
|
||||
两份tarball各6成员,完整哈希见ambilight-release.json;1.1.0不含src,直接核对dist。
|
||||
工作区源码、声明、README、manifest和demo另以Git冻结。目标2.0.0由REL-09修改。
|
||||
|
||||
## 运行时
|
||||
|
||||
注册时才读取配置,默认blur=50px、opacity=0.5、frequency=10、duration=0.3。同步返回
|
||||
{name,start,stop},两方法返回undefined。省略option可用,null在注册时抛错;创建工厂
|
||||
后、注册前的配置修改可观察。没有额外公开事件或destroy方法。
|
||||
|
||||
video之前插入artplayer-plugin-ambilight,绝对定位3×3网格,zIndex固定9;声明里的
|
||||
zIndex从未读取。9子节点保留filter、opacity和background-color transition。ready自动
|
||||
start;stop停止更新并保留最后颜色,start可恢复。playing且达到频率间隔时,将9个
|
||||
视频区域分别缩至1×1读取RGB。暂停仍调度RAF、不取色。特殊频率语义由02补齐。
|
||||
|
||||
## 公开差异
|
||||
|
||||
| 维度 | npm1.0.0 | npm1.1.0/工作区 | 迁移处理 |
|
||||
| --- | --- | --- | --- |
|
||||
| CJS | namespace.default | 可调用工厂 | 保留两种调用形式 |
|
||||
| ESM | 无独立mjs | mjs默认导出 | 保留真实ESM入口 |
|
||||
| 类型导出 | export=、全局声明 | export default | 04验证旧require/import=及新默认导入 |
|
||||
| Option字段 | 五字段必需 | 五字段可选 | 这是已发布历史变化,不是候选修正 |
|
||||
| 工厂参数 | 声明要求option | 同左 | 运行时允许省略;兼容补齐声明 |
|
||||
| zIndex | 声明有、运行时忽略 | 同左 | 继续接受旧输入并保留固定层级 |
|
||||
|
||||
README只有demo链接;当前demo明确传blur/opacity/frequency/duration。不能凭声明里的
|
||||
zIndex悄悄启用新布局行为。01核对真实声明形状,不把正则检查冒充完整消费者编译。
|
||||
|
||||
## 后续验证
|
||||
|
||||
destroy只stop,未清DOM/监听器;逃逸start可能重启;RAF的truthy检查会混淆id=0;
|
||||
空context、零尺寸和取色异常可能中断循环。目前登记源码观察,02必须复现、03修复。
|
||||
stop保留视图与核心destroy终止资源应分开,不能新增用户必须调用的方法。
|
||||
|
||||
registry gitHead对应核心5.1.7/5.3.1,仅是Git关联,不是tarball可复现或支持区间证明。
|
||||
未声明peerDependencies,05须实际验证旧核心/候选、Canvas代理及媒体能力。Canvas
|
||||
依赖可取色媒体、2Dcontext和origin-clean;Node记录器不证明浏览器像素或真机行为。
|
||||
01共7组检查,维护入口见 [Ambilight测试说明](../ambilight-validation.md)。
|
||||
@@ -0,0 +1,137 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"task": "PKG-AMBILIGHT-01",
|
||||
"capturedAt": "2026-09-12T02:42:35.458Z",
|
||||
"sourceCommit": "c57c7e4b164557d111bb92a9df17c2f28d2ee657",
|
||||
"registryObservation": {
|
||||
"versions": [
|
||||
"1.0.0",
|
||||
"1.1.0"
|
||||
],
|
||||
"latest": "1.1.0",
|
||||
"workspaceVersion": "1.1.0"
|
||||
},
|
||||
"release": {
|
||||
"name": "artplayer-plugin-ambilight",
|
||||
"version": "1.1.0",
|
||||
"metadataUrl": "https://registry.npmjs.org/artplayer-plugin-ambilight/1.1.0",
|
||||
"tarball": "https://registry.npmjs.org/artplayer-plugin-ambilight/-/artplayer-plugin-ambilight-1.1.0.tgz",
|
||||
"integrity": "sha512-FkMI7bn9HovJMfEdgkKbo7/vPt6vrzcpELTaC/vM7B99FPSMWzAf6GAE0xnNxU3KibYcBV5gXnBgvHgpG2xq2A==",
|
||||
"sha256": "e95bd60fd7bce52142cf0041bad811452305029cbe1129c7d89246eb260c5c86",
|
||||
"archiveBytes": 2638,
|
||||
"publishedAt": "2026-03-12T14:22:20.888Z",
|
||||
"registryGitHead": "daf133b22630b4a0eecfa3336bbddab0e9119d96",
|
||||
"files": {
|
||||
"package/README.md": "53946ecc0fca163d52465515dfa13de3619a01c3b89d7f966eafe0610584dede",
|
||||
"package/dist/artplayer-plugin-ambilight.js": "8f32290c65a13b0a3026dee0045fef4125a9c9ac788ecb1675aef05f79172693",
|
||||
"package/dist/artplayer-plugin-ambilight.legacy.js": "8f32290c65a13b0a3026dee0045fef4125a9c9ac788ecb1675aef05f79172693",
|
||||
"package/dist/artplayer-plugin-ambilight.mjs": "77486db6d24f50420c952de5b37d226e404089730c7c1c6be226c836f4e85f9c",
|
||||
"package/package.json": "39aa2790a79cbc2a62ba925ee5ff53bbb649440a5d7b9f526b3de819ece4f792",
|
||||
"package/types/artplayer-plugin-ambilight.d.ts": "a36998b4d96d9a3200022029bf92918cc516d5ae4f38dc78a1a76b53a736d086"
|
||||
},
|
||||
"manifest": {
|
||||
"name": "artplayer-plugin-ambilight",
|
||||
"version": "1.1.0",
|
||||
"description": "ambilight plugin for ArtPlayer",
|
||||
"author": "Harvey Zhao <laozhaochaguan@gmail.com>",
|
||||
"license": "MIT",
|
||||
"homepage": "https://artplayer.org",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"html5",
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./types/artplayer-plugin-ambilight.d.ts",
|
||||
"import": "./dist/artplayer-plugin-ambilight.mjs",
|
||||
"require": "./dist/artplayer-plugin-ambilight.js"
|
||||
},
|
||||
"./legacy": {
|
||||
"types": "./types/artplayer-plugin-ambilight.d.ts",
|
||||
"import": "./dist/artplayer-plugin-ambilight.legacy.js",
|
||||
"require": "./dist/artplayer-plugin-ambilight.legacy.js"
|
||||
}
|
||||
},
|
||||
"main": "./dist/artplayer-plugin-ambilight.js",
|
||||
"module": "./dist/artplayer-plugin-ambilight.mjs",
|
||||
"types": "./types/artplayer-plugin-ambilight.d.ts",
|
||||
"legacy": "./dist/artplayer-plugin-ambilight.legacy.js",
|
||||
"browserslist": "last 1 Chrome version"
|
||||
},
|
||||
"historicalCore": {
|
||||
"commit": "daf133b22630b4a0eecfa3336bbddab0e9119d96",
|
||||
"file": "packages/artplayer/package.json",
|
||||
"version": "5.3.1",
|
||||
"sha256LF": "862f3697876fe915dd0ada178da766ce823aae7563ed30b3e5b11b811202929c",
|
||||
"limitation": "Git association only; not a proof of support range or rebuilt tarball identity"
|
||||
}
|
||||
},
|
||||
"previous": [
|
||||
{
|
||||
"name": "artplayer-plugin-ambilight",
|
||||
"version": "1.0.0",
|
||||
"metadataUrl": "https://registry.npmjs.org/artplayer-plugin-ambilight/1.0.0",
|
||||
"tarball": "https://registry.npmjs.org/artplayer-plugin-ambilight/-/artplayer-plugin-ambilight-1.0.0.tgz",
|
||||
"integrity": "sha512-7UxcQLI1XZXJBfv4gZsTd1YKNL9Y7Uw2w13FyqgHqgtKWT06+EEl72UHl/C/Je1s1GHlTnw+Hdg6CphZbQ9k/g==",
|
||||
"sha256": "a95aa8c232ab48493e6b4d46b36edc8091230cbde5d18d7ec41912a4fa2b8956",
|
||||
"archiveBytes": 4751,
|
||||
"publishedAt": "2024-10-19T06:09:24.603Z",
|
||||
"registryGitHead": "9221d42964700e6a3190943d288a6e6822596790",
|
||||
"files": {
|
||||
"package/README.md": "f9efabb68702c9c9cafdaa6b82a919ef09c2fb511568764c79854a955503cb98",
|
||||
"package/dist/artplayer-plugin-ambilight.js": "caef43df8a2d4bd7aa5b42db2a16508a1f5b92443b8b76974e5e24b2a2c83911",
|
||||
"package/dist/artplayer-plugin-ambilight.legacy.js": "c6eb26f3e17432f62ac24a86f78789d3dcd2a7ca03c3701b65574cc916387c49",
|
||||
"package/package.json": "84c90d6d521c9d14a8140bef65171dce443b318630742f9901eb7c5ef5d10a3b",
|
||||
"package/src/index.js": "7e9eff950bbde38bfc63913f2ed6e47217d70cf0ba918eed3389df37d9b94a4f",
|
||||
"package/types/artplayer-plugin-ambilight.d.ts": "f08f24f814395cfd5f02bbcb1a9c99a02ed4692e9137d7a393c3ed395bba1515"
|
||||
},
|
||||
"manifest": {
|
||||
"license": "MIT",
|
||||
"version": "1.0.0",
|
||||
"name": "artplayer-plugin-ambilight",
|
||||
"types": "types/artplayer-plugin-ambilight.d.ts",
|
||||
"description": "ambilight plugin for ArtPlayer",
|
||||
"main": "dist/artplayer-plugin-ambilight.js",
|
||||
"legacy": "dist/artplayer-plugin-ambilight.legacy.js",
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"browserslist": "last 1 Chrome version",
|
||||
"homepage": "https://artplayer.org",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"html5",
|
||||
"video",
|
||||
"player"
|
||||
]
|
||||
},
|
||||
"historicalCore": {
|
||||
"commit": "9221d42964700e6a3190943d288a6e6822596790",
|
||||
"file": "packages/artplayer/package.json",
|
||||
"version": "5.1.7",
|
||||
"sha256LF": "8bd532103099c367fb2c289e0d410f144fdeb00b1b62cf850762a24b61e63c8a",
|
||||
"limitation": "Git association only; not a proof of support range or rebuilt tarball identity"
|
||||
}
|
||||
}
|
||||
],
|
||||
"source": {
|
||||
"packages/artplayer-plugin-ambilight/src/index.js": "c56e0a1c33a2ff54b20e6bc7eafd3e14b163e3f967cce86d48e594a2f6d1f6fe",
|
||||
"packages/artplayer-plugin-ambilight/types/artplayer-plugin-ambilight.d.ts": "a36998b4d96d9a3200022029bf92918cc516d5ae4f38dc78a1a76b53a736d086",
|
||||
"packages/artplayer-plugin-ambilight/package.json": "39aa2790a79cbc2a62ba925ee5ff53bbb649440a5d7b9f526b3de819ece4f792",
|
||||
"packages/artplayer-plugin-ambilight/README.md": "53946ecc0fca163d52465515dfa13de3619a01c3b89d7f966eafe0610584dede",
|
||||
"docs/assets/example/ambilight.js": "f97c1404886ba6474b4e14339c563fd2de50b7d50fdc4c9d59d85a3142a1ad52"
|
||||
},
|
||||
"limitation": "Frozen actual archives and workspace source; runtime/type compatibility and supported core ranges require separate tests"
|
||||
}
|
||||
Reference in new issue
Block a user