mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
fix(types): PKG-CHAPTER-04 preserve CJS ESM and legacy consumer contracts
This commit is contained in:
1 parent
48660c4e12
commit
bab80ff886
41 files changed
+1087
-119
No files matched your search
@@ -22,6 +22,10 @@ The registered name is `artplayerPluginChapter`. After metadata loads, use
|
||||
`update({})` to clear them. Update is synchronous and requires an options object.
|
||||
Chapter times are seconds; ranges must not overlap. `Infinity` as an end value uses the current duration.
|
||||
|
||||
TypeScript users can import `Chapters`, `Option` and `Result` with `import type`.
|
||||
Modern ESM/CommonJS and `/legacy` share the same API; old TypeScript resolution
|
||||
keeps the original `.d.ts` entry and a legacy subpath fallback.
|
||||
|
||||
The existing implementation sorts and fills the supplied array in place and replaces its Infinity end
|
||||
values. Pass a fresh array when you need to retain the original configuration. After switching media,
|
||||
call update with chapters appropriate to the new duration; initialization listens to metadata once.
|
||||
|
||||
Reference in new issue
Block a user