mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
Fix mobile progress
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user