feat: 新增配置项gesture,是否开启手势快进快退操作。 (#919)

Co-authored-by: lion <lion>
This commit is contained in:
Leo Wangandlion authored and GitHub committed 2025-03-22 11:46:05 +08:00
1 parent db5e9fc810
commit dd0fba6eb4
2 files changed
+10 -7

No files matched your search

+9 -7
View File
@@ -86,13 +86,15 @@ export default function gestureInit(art, events) {
touchTarget = $progress;
onTouchStart(event);
});
events.proxy($video, 'touchstart', (event) => {
touchTarget = $video;
onTouchStart(event);
});
events.proxy($video, 'touchmove', onTouchMove);
if(art.option.gesture){
events.proxy($video, 'touchstart', (event) => {
touchTarget = $video;
onTouchStart(event);
});
events.proxy($video, 'touchmove', onTouchMove);
}
events.proxy($progress, 'touchmove', onTouchMove);
events.proxy(document, 'touchend', onTouchEnd);
}
+1
View File
@@ -152,6 +152,7 @@ export default class Artplayer extends Emitter {
useSSR: false,
playsInline: true,
lock: false,
gesture: true,
fastForward: false,
autoPlayback: false,
autoOrientation: false,