let space key toggle video in fullscreen
[booh] / data / booh / themes / simple / root / booh.js
index 4f130be65918b56be2fcea62a1045d27638168bd..c50f3d9cd7cce4fbdffd58f8f13c9adb5f23cc8f 100644 (file)
@@ -328,6 +328,17 @@ function last() {
     display_current();
 }
 
+function toggle_video() {
+    if (types[current] == 'video' && dbltilda_flowplayer_active == 'true') {
+        var player = flowplayer('player');
+        if (player.isLoaded()) {
+            player.toggle();
+        } else {
+            player.play();
+        }
+    }
+}
+
 function keyDownEvent(key) {
     if (!key) {
         key = event;
@@ -337,6 +348,9 @@ function keyDownEvent(key) {
         return;
     }
     switch (key.which) {
+      case 32: // space
+        toggle_video();
+        break;
       case 36: // home
         first();
         break;