Optimize setBar event and add lazy loading for thumbnails in artplayer-plugin-chapter

This commit is contained in:
Harvey Zack committed 2024-06-03 00:38:54 +08:00
1 parent 2e72e0cec2
commit bc5761ecdb
3 files changed
+4 -1

No files matched your search

@@ -196,6 +196,7 @@ function artplayerPluginChapter(option = {}) {
});
if ($chapters.length) addClass($player, "artplayer-plugin-chapter");
else removeClass($player, "artplayer-plugin-chapter");
art.emit("setBar", "loaded", art.loaded || 0);
}
art.on("setBar", (type, percentage, event)=>{
if (!$chapters.length) return;