Mobile Video Seek Gesture

모바일 브라우저에서 좌우 스와이프 제스처로 동영상 탐색 및 길게 눌러 2배속 재생 (Shadow DOM 포함)

作者
FlyingGorae
日安装量
0
总安装量
6
评分
1 0 0
版本
4.0
创建于
2025-01-23
更新于
2025-03-09
大小
7.4 KB
许可证
MIT
适用于
所有网站

Video Assistant by Gesture


You can navigate videos on your mobile browser using left and right swipe gestures (like the Video Assistant on Samsung Internet Browser).


Code made by ChatGPT




#Update

v4.0
Added the function of long-pressing to accelerate the video.






You can adjust the sensitivity by changing the value after 'deltaX'.

timeChange = deltaX * 0.05; // 민감도 값 조정



You can adjust the accelerated speed when you long press by adjusting the numbers shown below.
You can also change the message displayed when the video is accelerated by modifying the '2x Speed' part.

video.playbackRate = 2.0; // 2배속
video.overlay.innerHTML = `2x Speed`;






There may be some videos where the gesture doesn't work.
This seems to be rarely on iOS and a little bit on Android.



Depending on the video playback environment, the long press acceleration function may not work properly. The code would be too messy to consider all cases, so it is made to be applied in general situations. If there is a bug, it is recommended to use the previous version (v3.7).

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址