aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorAndreas Hubel2020-12-28 22:52:32 +0100
committerAndreas Hubel2020-12-28 22:52:52 +0100
commit42c492145a137e85b0851b7e2a2ce0dd071588c8 (patch)
tree0ca2768bfeccb4119c2ec1203ae37035345b4b57 /assets
parentecc622911eaba0b6c93c2a3964a49af9d208283e (diff)
hacky way to improve webcut for rC3
Diffstat (limited to 'assets')
-rw-r--r--assets/netcut/assets/script.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/assets/netcut/assets/script.js b/assets/netcut/assets/script.js
index 7d84af9..bcc6534 100644
--- a/assets/netcut/assets/script.js
+++ b/assets/netcut/assets/script.js
@@ -25,15 +25,21 @@ player.ready(function() {
});
});
+// 900*25 - 600*25
+var offset = window.offset || 19121; // manual mesured value for rC3
var inframe = document.getElementById('inframe');
var outframe = document.getElementById('outframe');
+// values for Tracker.c3voc.de
+var CUTIN = (INFRAME - offset);
+var CUTOUT = (INFRAME - offset);
+
if(INFRAME != -1) {
- inframe.innerHTML = "inframe: " + (INFRAME / 25) + " seconds (frame " + INFRAME + ")\n";
+ inframe.innerHTML = "inframe: " + (CUTIN / 25) + " seconds (Record.Cutin: " + CUTIN + ")\n";
}
if(OUTFRAME != -1) {
- outframe.innerHTML = "outframe: " + (OUTFRAME / 25) + " seconds (frame " + OUTFRAME + ")\n";
+ outframe.innerHTML = "outframe: " + (CUTOUT / 25) + " seconds (Record.Cutout: " + CUTOUT + ")\n";
}
function fnord(e) {
@@ -68,3 +74,12 @@ function fnord(e) {
var playerdiv = document.getElementById('webcut');
playerdiv.addEventListener("keydown", fnord);
player.focus();
+
+document.addEventListener('keydown', function (event) {
+ // do not capture events from input fields
+ if (event.target.tagName === 'INPUT') {
+ return;
+ }
+ // redirect all other events to player
+ fnord(event);
+}); \ No newline at end of file