Fix mobile progress

This commit is contained in:
Harvey committed 2022-09-28 11:40:19 +08:00
1 parent 783b973fb2
commit 37bfafb174
6 files changed
+50 -36

No files matched your search

@@ -1,4 +1,5 @@
import { clamp, secondToTime, isMobile } from '../utils';
import { setCurrentTime } from '../control/progress';
export default function gestureInit(art, events) {
if (isMobile && !art.option.isLive) {
@@ -12,6 +13,10 @@ export default function gestureInit(art, events) {
const onTouchStart = (event) => {
if (event.touches.length === 1 && !art.isLock) {
if (touchTarget === $progress) {
setCurrentTime(art, event);
}
isDroging = true;
const { clientX, clientY } = event.touches[0];
startX = clientX;