update touchmove event

This commit is contained in:
Harvey committed 2022-04-26 17:52:15 +08:00
1 parent 3a3c21e059
commit 8549661327
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -3919,7 +3919,7 @@
events.proxy($video, 'touchmove', function (event) {
if (event.touches.length === 1 && isDroging) {
var clientX = event.touches[0].clientX;
var ratioX = clamp((clientX - startX) / $video.clientWidth, -1, 1);
var ratioX = clamp((clientX - startX) / art.width, -1, 1);
if (art.duration) {
currentTime = clamp(art.currentTime + art.duration * ratioX, 0, art.duration);