From 9367a9fba9a82f53fdc00e66155bb4869bb567fd Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Sun, 28 Jul 2019 03:22:09 +0000 Subject: [PATCH] assets/scripts.js: Add up/down keys to speed up/slow down video Again, useful for debugging. --- assets/scripts.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/scripts.js b/assets/scripts.js index d624d34..1c5762d 100644 --- a/assets/scripts.js +++ b/assets/scripts.js @@ -414,12 +414,14 @@ window.onload = function() { document.onkeydown = function (e) { if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return; - if (e.key == 'ArrowLeft') { + if (e.key == 'ArrowLeft') jumpBack(); - } - if (e.key == 'ArrowRight') { + if (e.key == 'ArrowRight') jumpForward(); - } + if (e.key == 'ArrowUp') + video_selector.playbackRate = video_selector.playbackRate * 2.0; + if (e.key == 'ArrowDown') + video_selector.playbackRate = video_selector.playbackRate / 2.0; }; window.onhashchange = function() {