This commit is contained in:
Harvey Zack committed 2018-11-28 18:26:42 +08:00
1 parent bdb050f0a7
commit 970e7e3b89
20 files changed
+23 -9

No files matched your search

@@ -5,6 +5,7 @@ export function getPosFromEvent(art, event) {
template: { $progress },
player,
} = art;
const { left } = $progress.getBoundingClientRect();
const width = clamp(event.x - left, 0, $progress.clientWidth);
const second = (width / $progress.clientWidth) * player.duration;