From bdce41c3ae2c46ca10cb46d91881c9dceae0588c Mon Sep 17 00:00:00 2001 From: gnattu Date: Fri, 17 May 2024 16:08:51 +0800 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20bind=20to=20keyevents=20of=20me?= =?UTF-8?q?dia=20keys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These events are already handled by MediaSession. On some operating systems, like Windows, the browser will send both the MediaSession event and the keydown event to the webpage, causing the event to be handled twice and resulting in issues. --- src/scripts/keyboardNavigation.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/scripts/keyboardNavigation.js b/src/scripts/keyboardNavigation.js index 6e8e477d7a..7673c4c6f5 100644 --- a/src/scripts/keyboardNavigation.js +++ b/src/scripts/keyboardNavigation.js @@ -167,24 +167,6 @@ export function enable() { case 'Pause': inputManager.handleCommand('pause'); break; - case 'MediaPlayPause': - inputManager.handleCommand('playpause'); - break; - case 'MediaRewind': - inputManager.handleCommand('rewind'); - break; - case 'MediaFastForward': - inputManager.handleCommand('fastforward'); - break; - case 'MediaStop': - inputManager.handleCommand('stop'); - break; - case 'MediaTrackPrevious': - inputManager.handleCommand('previoustrack'); - break; - case 'MediaTrackNext': - inputManager.handleCommand('nexttrack'); - break; default: capture = false;