dropin

alternative frontend for dropout.tv
git clone https://git.ce9e.org/dropin.git

commit
33b3a87bccae31e0898a19fdca853cf32fc2a376
parent
fb374b4b6fecad2a844988eb36596a90ee0f44ed
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2025-02-25 23:03
add youtube shortcuts

f - toggle fullscreen
k - toggle paused
m - toggle muted
N - next

Diffstat

M static/video.js 23 +++++++++++++++++++++++

1 files changed, 23 insertions, 0 deletions


diff --git a/static/video.js b/static/video.js

@@ -71,6 +71,29 @@ video.addEventListener('ended', event => {
   71    71     }
   72    72 });
   73    73 
   -1    74 document.addEventListener('keyup', event => {
   -1    75     if (event.key === 'f') {
   -1    76         if (document.fullscreenElement) {
   -1    77             document.exitFullscreen();
   -1    78         } else {
   -1    79             video.requestFullscreen();
   -1    80         }
   -1    81     } else if (event.key === 'k') {
   -1    82         if (video.paused) {
   -1    83             video.play();
   -1    84         } else {
   -1    85             video.pause();
   -1    86         }
   -1    87     } else if (event.key === 'm') {
   -1    88         video.muted = !video.muted;
   -1    89     } else if (event.key === 'N') {
   -1    90         var a = document.querySelector('a[rel="next"]');
   -1    91         if (a) {
   -1    92             a.click();
   -1    93         }
   -1    94     }
   -1    95 });
   -1    96 
   74    97 var menu = createMenu();
   75    98 video.after(menu);
   76    99 applyQuality(localStorage.getItem('quality'), true);