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:
parent
9124468fc5
commit
9c21c9565f
1 changed files with 17 additions and 0 deletions
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue