fix(canvas): [PKG-CANVAS-SUBTITLE-01] attach native subtitle tracks

This commit is contained in:
Harvey Zhao committed 2026-09-14 18:51:57 +08:00
1 parent d89728c0a6
commit c3967bcbf4
23 files changed
+1459 -11

No files matched your search

@@ -53,6 +53,12 @@ Runtime falsy callback arguments retain historical behavior; declarations accept
optional function, matching the published types. Implementation and test guidance is in
[ARCHITECTURE.md](ARCHITECTURE.md).
The standard ArtPlayer `subtitle` option uses native subtitle tracks on the backing
video. HTML track elements passed to the active proxy's `appendChild` are attached
there so captions can load and follow playback; ordinary Canvas content keeps its
normal parent. The initial metadata track is replaced by the first actual subtitle.
This repairs the previously empty subtitle path without changing subtitle options.
### Older TypeScript consumers
The 1.0.0 declaration used `export =` and required a callback; 1.1.0 changed to