update gestureInit

This commit is contained in:
Harvey committed 2022-03-10 18:40:12 +08:00
1 parent 8898ab0078
commit 0f388c5173
3 files changed
+18 -5

No files matched your search

+7 -2
View File
@@ -3863,11 +3863,15 @@
var isDroging = false;
var startX = 0;
var currentTime = 0;
var pressTimer = null;
events.proxy($video, 'touchstart', function (event) {
if (event.touches.length === 1) {
isDroging = true;
startX = event.touches[0].clientX;
art.playbackRate = 3;
clearTimeout(pressTimer);
pressTimer = setTimeout(function () {
art.playbackRate = 3;
}, 1000);
}
});
events.proxy($video, 'touchmove', function (event) {
@@ -3884,10 +3888,11 @@
art.seek = currentTime;
}
art.playbackRate = 1;
startX = 0;
currentTime = 0;
isDroging = false;
art.playbackRate = 1;
clearTimeout(pressTimer);
}
});
}