mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 21:31:20 -08:00
Optimize setBar event and handle non-array chapters in artplayer-plugin-chapter
This commit is contained in:
1 parent
d8ff61acf7
commit
f3db438d6b
3 files changed
+3
-1
No files matched your search
@@ -179,6 +179,7 @@ function artplayerPluginChapter(option = {}) {
|
||||
} else setStyle($title, "display", "none");
|
||||
}
|
||||
function update(chapters = []) {
|
||||
if (!Array.isArray(chapters)) return;
|
||||
if (!chapters.length) return;
|
||||
if (!art.duration) return;
|
||||
chapters = chapters.sort((a, b)=>a.start - b.start);
|
||||
|
||||
Reference in new issue
Block a user