From 8e9461865fcce2fbea4ca1f78233a2865dc25829 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 1 Apr 2018 14:03:31 +0530 Subject: [PATCH] fix seek --- index.html | 2 +- js/app.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 6254db3..629e259 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - + diff --git a/js/app.js b/js/app.js index a1b7d9f..8071070 100644 --- a/js/app.js +++ b/js/app.js @@ -45,6 +45,7 @@ Ox.load({ return false; } } + var seekTime = parseFloat($('#seekTime').val()); if (navigator.platform == 'MacIntel') { //Ctrl - Seek Back if (e.keyCode == 17) { @@ -56,12 +57,12 @@ Ox.load({ } } else { //PageUp - seek back - if (e.keyCode == 33) { + if (e.keyCode == 33 && !e.shiftKey) { seek(-seekTime) } // PageDown - seek fwd. - if (e.keyCode == 34) { + if (e.keyCode == 34 && !e.shiftKey) { seek(seekTime) } } @@ -331,7 +332,6 @@ function loadVideo(videoFile) { }; function seek(delta) { - var seekTime = parseFloat($('#seekTime').val()); var currTime = Video.get(); var newTime = currTime + delta; Video.set(newTime);