Optimize setBar event and update chapter display in artplayer-plugin-chapter

This commit is contained in:
Harvey Zack committed 2024-06-03 00:35:47 +08:00
1 parent 94e34320e0
commit 2e72e0cec2
4 files changed
+69 -61

No files matched your search

@@ -3,16 +3,19 @@ import type Artplayer from 'artplayer';
export = artplayerPluginChapter;
export as namespace artplayerPluginChapter;
type Chapters = {
start: number;
end: number;
title: string;
}[];
type Option = {
chapters?: {
start: number;
end: number;
title: string;
}[];
chapters?: Chapters;
};
type Result = {
name: 'artplayerPluginChapter';
update: (chapters: Chapters) => void;
};
declare const artplayerPluginChapter: (option: Option) => (art: Artplayer) => Result;