mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
完善区间循环文档
This commit is contained in:
1 parent
7d6186ddd6
commit
dba9c6dd78
4 files changed
+14
-10
No files matched your search
@@ -10,14 +10,14 @@ export default function loopMin(art, player) {
|
||||
const end = clamp(value[1], start, player.duration);
|
||||
if (end - start >= 1) {
|
||||
interval = [start, end];
|
||||
art.emit('loop:add', interval);
|
||||
art.emit('loopAdd', interval);
|
||||
} else {
|
||||
interval = [];
|
||||
art.emit('loop:remove');
|
||||
art.emit('loopRemove');
|
||||
}
|
||||
} else {
|
||||
interval = [];
|
||||
art.emit('loop:remove');
|
||||
art.emit('loopRemove');
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -26,7 +26,7 @@ export default function loopMin(art, player) {
|
||||
if (interval.length) {
|
||||
if (player.currentTime < interval[0] || player.currentTime > interval[1]) {
|
||||
player.seek = interval[0];
|
||||
art.emit('loop', interval);
|
||||
art.emit('loopStart', interval);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user