Add MPC-BE remote control and resume support.
This commit is contained in:
1 parent
76c4cc0829
commit
c405ea98b3
10 files changed
+1356
-8
No files matched your search
@@ -54,6 +54,13 @@ function applyGamepadAction(action: GamepadAction, isPressed: boolean, now: numb
|
||||
if (!canTrigger) return;
|
||||
|
||||
gamepadLastTriggerAt[action] = now;
|
||||
const actionEvent = new CustomEvent('mediahive:gamepad-action', {
|
||||
detail: { action },
|
||||
cancelable: true,
|
||||
});
|
||||
const shouldContinueWithKeyboard = window.dispatchEvent(actionEvent);
|
||||
if (!shouldContinueWithKeyboard) return;
|
||||
|
||||
dispatchKey(KEY_BY_ACTION[action]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user