1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Scaffolding for double-tap to seek

This commit is contained in:
Himadri Bhattacharjee 2025-02-07 14:17:37 +05:30
parent 9124468fc5
commit 9c21c9565f
No known key found for this signature in database

View file

@ -1839,6 +1839,23 @@ export default function (view) {
dom.addEventListener(view, 'dblclick', (e) => {
if (e.target !== view) return;
const pointerType = e.pointerType || (layoutManager.mobile ? 'touch' : 'mouse');
if (pointerType === 'touch') {
const third = view.clientWidth / 3;
// left third
if (e.clientX < third) {
playbackManager.rewind(currentPlayer);
showOsd(btnRewind);
return;
}
// right third
if (e.clientX > 2 * third) {
playbackManager.fastForward(currentPlayer);
showOsd(btnFastForward);
return;
}
}
playbackManager.toggleFullscreen(currentPlayer);
});