mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
Optimize setBar event and add lazy loading for thumbnails in artplayer-plugin-chapter
This commit is contained in:
1 parent
aaa5ef310e
commit
d99fa9447a
6 files changed
+47
-25
No files matched your search
@@ -66,7 +66,7 @@ export default function gestureInit(art, events) {
|
||||
const TOUCH_MOVE_RATIO = touchTarget === $video ? art.constructor.TOUCH_MOVE_RATIO : 1;
|
||||
const currentTime = clamp(startTime + art.duration * ratio * TOUCH_MOVE_RATIO, 0, art.duration);
|
||||
art.seek = currentTime;
|
||||
art.emit('setBar', 'played', clamp(currentTime / art.duration, 0, 1));
|
||||
art.emit('setBar', 'played', clamp(currentTime / art.duration, 0, 1), event);
|
||||
art.notice.show = `${secondToTime(currentTime)} / ${secondToTime(art.duration)}`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user