mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
refactor(core): CORE-03 add typed resource scopes and cleanup adapters
This commit is contained in:
1 parent
362c616998
commit
3e38dd0d19
12 files changed
+1242
-6
No files matched your search
@@ -0,0 +1,692 @@
|
||||
{
|
||||
"task": "CORE-03",
|
||||
"date": "2026-09-11",
|
||||
"node": "v24.21.0",
|
||||
"parentCommit": "362c6169987bb32c120e81ea267eeaa3bd8f63b8",
|
||||
"source": {
|
||||
"packages/artplayer/src/lifecycle/scope.ts": "e2188e8544b27cf8c7ac149e7146af628a2d6166c82b719a247adef5d85be5db",
|
||||
"packages/artplayer/src/lifecycle/resources.ts": "2ff9cb71035ac5694c92a6b01f7454890bd652ba4b7774e8973500de7f7d204c",
|
||||
"test/resource-scope.test.js": "f1b5bfb3fd863bee9493a26152aad6d110d47a8fc1f369da7e94c57d0538a123",
|
||||
"test/types/resource-scope.ts": "a8c056914e8529c871891ed672030248d359a19f8571a5ac5a5f18952ea5def0",
|
||||
"test/browser/resource-scope.spec.js": "0196bd9943c1ce2f6560f87156cd0de47606579c1a736bd46d4943179a121d3f"
|
||||
},
|
||||
"ci": {
|
||||
"command": "yarn ci:check",
|
||||
"passed": 94,
|
||||
"unit": 66,
|
||||
"engineering": 4,
|
||||
"baseline": 24,
|
||||
"sourceTypes": 15,
|
||||
"logSha256": "e4982bd5055665e0bb40dc41c2c1ba319a935bff22ef6565ad102c4403ce09b6"
|
||||
},
|
||||
"build": {
|
||||
"commands": [
|
||||
"yarn build artplayer",
|
||||
"yarn build:i18n"
|
||||
],
|
||||
"generatedGitDifference": false,
|
||||
"logs": [
|
||||
{
|
||||
"file": "core03-build.log",
|
||||
"sha256": "21ffc4ba5064d496a5c5da4a3f5eaebe9bb6de240fdb44938f2858120e52d934"
|
||||
},
|
||||
{
|
||||
"file": "core03-i18n.log",
|
||||
"sha256": "4b5a3b6f03affadff34eb605405c16cad36f9fb9c7b61e54a446148140048490"
|
||||
}
|
||||
]
|
||||
},
|
||||
"browser": {
|
||||
"command": "yarn test:browser",
|
||||
"candidateKind": "workspace-build",
|
||||
"internalFixtureKind": "internal-source-fixture",
|
||||
"stats": {
|
||||
"startTime": "2026-09-10T16:19:36.559Z",
|
||||
"duration": 28138.681,
|
||||
"expected": 78,
|
||||
"skipped": 0,
|
||||
"unexpected": 0,
|
||||
"flaky": 0
|
||||
},
|
||||
"internal": [
|
||||
{
|
||||
"engine": "chromium",
|
||||
"version": "153.0.8010.12",
|
||||
"platform": "win32",
|
||||
"fixture": {
|
||||
"kind": "internal-source-fixture",
|
||||
"target": "es2015",
|
||||
"sha256": "032ba327c57b8d94d005558c64bc153dfb2e1d6fcb80cf50adca0ae5cdd7f471"
|
||||
},
|
||||
"pageErrors": [],
|
||||
"controlledConsole": [
|
||||
"Failed to load resource: net::ERR_FILE_NOT_FOUND"
|
||||
],
|
||||
"controlledFailedRequests": [
|
||||
{
|
||||
"url": "http://127.0.0.1:8084/test/pattern.mp4",
|
||||
"resourceType": "fetch",
|
||||
"failure": {
|
||||
"errorText": "net::ERR_ABORTED"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "blob:http://127.0.0.1:8084/bb671d68-fcc1-4374-ac45-06ea586b13fd",
|
||||
"resourceType": "fetch",
|
||||
"failure": {
|
||||
"errorText": "net::ERR_FILE_NOT_FOUND"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"engine": "firefox",
|
||||
"version": "155.0",
|
||||
"platform": "win32",
|
||||
"fixture": {
|
||||
"kind": "internal-source-fixture",
|
||||
"target": "es2015",
|
||||
"sha256": "032ba327c57b8d94d005558c64bc153dfb2e1d6fcb80cf50adca0ae5cdd7f471"
|
||||
},
|
||||
"pageErrors": [],
|
||||
"controlledConsole": [],
|
||||
"controlledFailedRequests": []
|
||||
},
|
||||
{
|
||||
"engine": "webkit",
|
||||
"version": "26.6",
|
||||
"platform": "win32",
|
||||
"fixture": {
|
||||
"kind": "internal-source-fixture",
|
||||
"target": "es2015",
|
||||
"sha256": "032ba327c57b8d94d005558c64bc153dfb2e1d6fcb80cf50adca0ae5cdd7f471"
|
||||
},
|
||||
"pageErrors": [],
|
||||
"controlledConsole": [
|
||||
"Failed to load resource"
|
||||
],
|
||||
"controlledFailedRequests": [
|
||||
{
|
||||
"url": "http://127.0.0.1:8084/test/pattern.mp4",
|
||||
"resourceType": "fetch",
|
||||
"failure": {
|
||||
"errorText": "Load request cancelled"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "blob:http://127.0.0.1:8084/884f53c0-917f-4730-be3f-32b8f0d5e2b8",
|
||||
"resourceType": "fetch",
|
||||
"failure": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"cases": [
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "published-only observations: blank title, NaN and once-only metadata are historical defects",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate clears titles on blank chapters, zero hover and replacement",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate rejects NaN and can recover after an invalid update",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate releases only its listeners and DOM across multiple instances and early destruction",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate ignores pending metadata initialization after immediate destroy",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate deduplicates stylesheet injection while the document is loading",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "published-only observations: blank title, NaN and once-only metadata are historical defects",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate clears titles on blank chapters, zero hover and replacement",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate rejects NaN and can recover after an invalid update",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate releases only its listeners and DOM across multiple instances and early destruction",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate ignores pending metadata initialization after immediate destroy",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate deduplicates stylesheet injection while the document is loading",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "published-only observations: blank title, NaN and once-only metadata are historical defects",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate clears titles on blank chapters, zero hover and replacement",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate rejects NaN and can recover after an invalid update",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate releases only its listeners and DOM across multiple instances and early destruction",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate ignores pending metadata initialization after immediate destroy",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "candidate deduplicates stylesheet injection while the document is loading",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "factory, registration, input normalization and safe title text",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "progress bars, real hover, title edges and boundary seek",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "sync update, Infinity, object identity, empty lists and invalid data",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "explicit source update and core-owned destruction",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "factory, registration, input normalization and safe title text",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "progress bars, real hover, title edges and boundary seek",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "sync update, Infinity, object identity, empty lists and invalid data",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "explicit source update and core-owned destruction",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "factory, registration, input normalization and safe title text",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "progress bars, real hover, title edges and boundary seek",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "sync update, Infinity, object identity, empty lists and invalid data",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "explicit source update and core-owned destruction",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "factory, registration, input normalization and safe title text",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "progress bars, real hover, title edges and boundary seek",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "sync update, Infinity, object identity, empty lists and invalid data",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "explicit source update and core-owned destruction",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "factory, registration, input normalization and safe title text",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "progress bars, real hover, title edges and boundary seek",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "sync update, Infinity, object identity, empty lists and invalid data",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "explicit source update and core-owned destruction",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "factory, registration, input normalization and safe title text",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "progress bars, real hover, title edges and boundary seek",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "sync update, Infinity, object identity, empty lists and invalid data",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "chapter.spec.js",
|
||||
"title": "explicit source update and core-owned destruction",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "emitter.spec.js",
|
||||
"title": "published: emitter event names and once across nested dispatch",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "emitter.spec.js",
|
||||
"title": "candidate: emitter event names and once across nested dispatch",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "emitter.spec.js",
|
||||
"title": "published: emitter event names and once across nested dispatch",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "emitter.spec.js",
|
||||
"title": "candidate: emitter event names and once across nested dispatch",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "emitter.spec.js",
|
||||
"title": "published: emitter event names and once across nested dispatch",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "emitter.spec.js",
|
||||
"title": "candidate: emitter event names and once across nested dispatch",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "published: real playback, pause, seek, switch and destroy",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "candidate: real playback, pause, seek, switch and destroy",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "controlled HTTP media failure emits a real video error",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "Range, media identity and docs candidate routes",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "published: real playback, pause, seek, switch and destroy",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "candidate: real playback, pause, seek, switch and destroy",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "controlled HTTP media failure emits a real video error",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "Range, media identity and docs candidate routes",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "published: real playback, pause, seek, switch and destroy",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "candidate: real playback, pause, seek, switch and destroy",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "controlled HTTP media failure emits a real video error",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "playback.spec.js",
|
||||
"title": "Range, media identity and docs candidate routes",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "resource-scope.spec.js",
|
||||
"title": "internal resource scope: native DOM, RAF, timer, fetch abort and URL release",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "resource-scope.spec.js",
|
||||
"title": "internal resource scope: native DOM, RAF, timer, fetch abort and URL release",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "resource-scope.spec.js",
|
||||
"title": "internal resource scope: native DOM, RAF, timer, fetch abort and URL release",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "published: subtitle object URL contains real VTT data",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "published: download starts and removes its temporary anchor",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "candidate: subtitle object URL contains real VTT data",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "candidate: download starts and removes its temporary anchor",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "candidate download releases the anchor even when click fails",
|
||||
"engine": "chromium",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "published: subtitle object URL contains real VTT data",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "published: download starts and removes its temporary anchor",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "candidate: subtitle object URL contains real VTT data",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "candidate: download starts and removes its temporary anchor",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "candidate download releases the anchor even when click fails",
|
||||
"engine": "firefox",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "published: subtitle object URL contains real VTT data",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "published: download starts and removes its temporary anchor",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "candidate: subtitle object URL contains real VTT data",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "candidate: download starts and removes its temporary anchor",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
},
|
||||
{
|
||||
"file": "utils.spec.js",
|
||||
"title": "candidate download releases the anchor even when click fails",
|
||||
"engine": "webkit",
|
||||
"status": "passed",
|
||||
"retry": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"firstFailure": {
|
||||
"stats": {
|
||||
"startTime": "2026-09-10T16:15:26.658Z",
|
||||
"duration": 33097.064,
|
||||
"expected": 77,
|
||||
"skipped": 0,
|
||||
"unexpected": 1,
|
||||
"flaky": 0
|
||||
},
|
||||
"engine": "firefox",
|
||||
"assertion": "revokedRejected expected true, received false using an already decoded image",
|
||||
"resolution": "Replace image decoding with fresh fetch before and after revocation; assert exact TypeError. Also abort an in-flight native fetch.",
|
||||
"reportSha256": "8e2bbafe70e81957f37501901957598b3a88d4e5f272dcdaaedb56839f59118a"
|
||||
},
|
||||
"limits": [
|
||||
"No player constructor/destroy integration until CORE-04",
|
||||
"No package install rerun for this currently unreferenced internal module",
|
||||
"No remote CI, device or SDK validation in this task"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
# CORE-03:内部资源作用域
|
||||
|
||||
## 结构与契约
|
||||
|
||||
新增核心 lifecycle/scope.ts 与 resources.ts:前者管理同步清理、父子作用域及异常汇总;
|
||||
后者封装 DOM 监听、定时器、RAF、AbortController 与自有 Blob URL。没有新依赖,
|
||||
没有把内部能力导出到 Artplayer/utils 或要求旧插件依赖它。
|
||||
|
||||
实例可持有长期 scope,切源、字幕请求等单次操作使用 child。子作用域结束会脱离父登记,
|
||||
不会释放兄弟操作。清理先关闭作用域,再逆序释放;释放登记在调用前移除,重复和重入安全。
|
||||
单项失败不中断其他清理,最后统一抛出 ResourceCleanupError 并保留原始错误。
|
||||
显式 release 的错误直接传播,该登记仍只消费一次;后续所有者需在生命周期边界处理。
|
||||
|
||||
Cleanup 的返回类型为 undefined,严格拒绝 async/Promise 清理,避免同步 destroy 丢失异步失败。
|
||||
异步媒体/SDK 关闭将由对应包明确等待,不伪装成同步回收。Emitter 订阅用独立 callback 加入
|
||||
scope,并通过原 off API 释放;实例和操作各自只清理拥有的资源。
|
||||
|
||||
监听保留函数/对象接收者、固定 capture、处理 once 重入和外部 abort;计时器/RAF 完成后脱离
|
||||
登记,取消后即使已排队的回调被调用也不会工作。缺少 AbortController 时返回 undefined,
|
||||
请求所有者必须继续防止过期回调。Blob URL 只释放本 helper 创建的 URL,不接管用户传入 URL。
|
||||
|
||||
对应 API-04/05/07/10:这是内部边界建立,不改变现有公开行为。CORE-04 才接入播放器的
|
||||
构造/销毁;当前 Events、历史 timer/request 尚未迁移,BASE-LIFE-04/05 与 BASE-PERF-01
|
||||
继续开放,不能把本任务的 scope 测试写成播放器泄漏已修复。
|
||||
|
||||
## 验证与维护
|
||||
|
||||
- test:unit 加入 resource-scope.test.js,共九项资源测试:异常汇总、重入、late add、
|
||||
子作用域脱离、独立释放失败、订阅归属、受控 timer、已排队 RAF、DOM/abort/URL 与能力缺失。
|
||||
- test/types/resource-scope.ts 含四个必须拒绝的类型用例;全部严格源类型和消费者检查通过。
|
||||
- yarn ci:check:66 项单元、4 项工程、24 项冻结基线,共 94 项通过,无跳过。
|
||||
- 三浏览器 78 项通过;其中 3 项通过明确标注的 es2015 内部源码 fixture 验证原生 DOM、
|
||||
RAF、timer、进行中的 fetch 取消和 Blob URL 撤销。其余为既有发布/工作区播放与插件回归。
|
||||
源码 fixture 不冒充安装 tarball;内部代码尚未由公开入口引用。
|
||||
- 负向控制只允许本 case 的精确 URL、fetch 类型及已观察的引擎错误;其他网络错误不被忽略。
|
||||
- yarn build artplayer 与 yarn build:i18n 通过,生成产物无 Git 差异。本次未重复执行安装打包;
|
||||
没有把上一任务的打包证据冒充本次新执行。
|
||||
|
||||
首次浏览器运行 77 通过、Firefox 1 失败:撤销后的 URL 仍能复用已解码图片,说明图片缓存
|
||||
不是 URL 可用性的可靠判断。测试改为撤销前读出内容、撤销后 fresh fetch 精确 TypeError;
|
||||
同时验证进行中的 fetch 返回 AbortError。没有修改生产实现去迎合缓存,也没有重试或跳过。
|
||||
最初 Node RAF mock 误用了不存在的方法创建选项,已改为显式安装并恢复测试全局;生产不打补丁。
|
||||
执行指纹、首次失败摘要和最终状态见 [验证报告](../baselines/resource-scope-validation.json)。
|
||||
|
||||
[核心架构](../../packages/artplayer/ARCHITECTURE.md) 维护所有权、错误协议、内部/公开边界与修改入口。
|
||||
下一项 CORE-04 需接入实例登记、处理构造失败/重复销毁并补真实播放器回归,再按各任务迁移
|
||||
具体操作资源。本任务独立提交;回退提交即可恢复文件、脚本和文档。无推送、版本变更或发布。
|
||||
+3
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
基线:`40fcda6a37d0049d42e49c1e64e70d4fd9ba5f7f`。总任务 214 项,范围 22 个包及工作区/示例。
|
||||
|
||||
状态:todo 176 / doing 0 / blocked 0 / done 38 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
状态:todo 175 / doing 0 / blocked 0 / done 39 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
|
||||
前置依赖是启动条件;验收是完成条件。任务可以继续拆分,但不能复用或悄悄删除旧 ID。
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
| --- | --- | --- | --- | --- | --- | --- |
|
||||
| CORE-01 | artplayer<br>迁移纯工具并冻结导出 | ENG-03, ENG-04, ENG-06, PILOT-01 | utils/time/property/format/file/error/subtitle 的分批 TS 迁移 | Artplayer.utils 导出/参数/绑定保持,纯逻辑与类型测试通过 | M | done |
|
||||
| CORE-02 | artplayer<br>迁移内部 Emitter | CORE-01, BASE-03 | 带类型事件映射的原 Emitter 实现 | ctx、once/off、重入/异常和链式返回保持 | H | done |
|
||||
| CORE-03 | artplayer<br>建立内部资源作用域 | CORE-02 | 监听/订阅/定时器/RAF/请求/URL 的资源登记 | 实例与操作作用域分离,单项清理失败不阻断其他资源 | H | todo |
|
||||
| CORE-03 | artplayer<br>建立内部资源作用域 | CORE-02 | 监听/订阅/定时器/RAF/请求/URL 的资源登记 | 实例与操作作用域分离,单项清理失败不阻断其他资源 | H | done |
|
||||
| CORE-04 | artplayer<br>修复初始化与销毁生命周期 | CORE-03, ENG-05, BASE-07 | 构造失败回收、重复/重入 destroy、instances 修复 | 事件顺序、removeHtml、多实例和销毁中异步有真实回归;处理 baselines/lifecycle-coverage.md 的 BASE-LIFE-04/05 并增加候选正向回归;协调 BASE-PERF-01 销毁后定时器与回调归属 | H | todo |
|
||||
| CORE-05 | artplayer<br>区分输入配置和内部配置 | CORE-01, ENG-04 | Option/ResolvedOption、默认值与校验整理 | 配置合并/错误时机不变,JS 输入仍运行时校验 | M | todo |
|
||||
| CORE-06 | artplayer<br>建立内部媒体与宿主类型 | CORE-05 | 原生 video、canvas shim、UI host 类型 | 不更改公开 art.video 用法,不以 HTMLVideoElement 断言掩盖 shim | M | todo |
|
||||
@@ -437,6 +437,7 @@
|
||||
- PILOT-01: [记录](changes/2026-09-10-PILOT-01-chapter.md) [记录](baselines/pilot-validation.json)
|
||||
- CORE-01: [记录](changes/2026-09-10-CORE-01-typed-utils.md) [记录](baselines/core-utils-validation.json)
|
||||
- CORE-02: [记录](changes/2026-09-11-CORE-02-typed-emitter.md) [记录](baselines/emitter-validation.json)
|
||||
- CORE-03: [记录](changes/2026-09-11-CORE-03-resource-scope.md) [记录](baselines/resource-scope-validation.json)
|
||||
- PKG-CHAPTER-01: [记录](changes/2026-09-10-PKG-CHAPTER-01-contract.md) [记录](baselines/chapter-contract.md)
|
||||
- PKG-CHAPTER-02: [记录](changes/2026-09-10-PKG-CHAPTER-02-tests.md) [记录](baselines/chapter-validation.json)
|
||||
- PKG-CHAPTER-03: [记录](changes/2026-09-10-PKG-CHAPTER-03-typescript-modules.md) [记录](baselines/chapter-migration-validation.json)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# 进度与证据
|
||||
|
||||
## 当前实施:CORE-03 内部资源作用域完成
|
||||
|
||||
新增两个核心 TS 文件,明确同步清理、实例/操作作用域、异常汇总及原生资源适配。94 项 Node/基线与 78 项三浏览器检查通过;首次 Firefox 图片缓存误判已保留并改为 fresh fetch 验证。见 [交付](changes/2026-09-11-CORE-03-resource-scope.md)。当前 214 项,39 完成、175 待办;核心十个 TS 文件、chapter 五个。作用域尚未接入播放器,旧生命周期风险仍开放;下一项 CORE-04 直接改构造与销毁。
|
||||
|
||||
## 当前实施:CORE-02 Emitter TS 迁移完成
|
||||
|
||||
事件映射、payload/ctx 和链式类型已加入;九组普通契约保持,另修复原型事件名与嵌套快照重复 once。85 项 Node/基线、75 项三浏览器、三格式各 29 项 Emitter 检查通过;严格打包 27 项运行时/五组类型零诊断。见 [交付](changes/2026-09-11-CORE-02-typed-emitter.md)。当前 214 项,38 完成、176 待办。核心八个 TS 文件、chapter 五个 TS 文件;下一项 CORE-03 内部资源作用域。
|
||||
|
||||
+5
-2
@@ -789,11 +789,14 @@
|
||||
"dependsOn": [
|
||||
"CORE-02"
|
||||
],
|
||||
"status": "todo",
|
||||
"status": "done",
|
||||
"risk": "H",
|
||||
"deliverable": "监听/订阅/定时器/RAF/请求/URL 的资源登记",
|
||||
"acceptance": "实例与操作作用域分离,单项清理失败不阻断其他资源",
|
||||
"evidence": []
|
||||
"evidence": [
|
||||
"changes/2026-09-11-CORE-03-resource-scope.md",
|
||||
"baselines/resource-scope-validation.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CORE-04",
|
||||
|
||||
Reference in new issue
Block a user