mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
feat: Optimize chapter handling in artplayer-plugin-chapter
This commit is contained in:
1 parent
e11a2da806
commit
999988465c
3 files changed
+5
-3
No files matched your search
@@ -42,6 +42,8 @@ export default function artplayerPluginChapter(option = {}) {
|
||||
}
|
||||
|
||||
function update(chapters = []) {
|
||||
$chapters = [];
|
||||
$control.innerText = '';
|
||||
removeClass($player, 'artplayer-plugin-chapter');
|
||||
|
||||
if (!Array.isArray(chapters)) return;
|
||||
@@ -93,7 +95,6 @@ export default function artplayerPluginChapter(option = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
$control.innerText = '';
|
||||
$chapters = chapters.map((chapter) => {
|
||||
const $chapter = append($control, html);
|
||||
const start = clamp(chapter.start, 0, art.duration);
|
||||
|
||||
Reference in new issue
Block a user