From 814a0af1a8b8a83c84a8ae2ddf1436a8e7acd434 Mon Sep 17 00:00:00 2001 From: Botzy Date: Wed, 27 Aug 2025 14:08:32 +0300 Subject: [PATCH 1/3] feat(Player): added keyboard shortcut for mute toggle --- src/routes/Player/Player.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/routes/Player/Player.js b/src/routes/Player/Player.js index 436f1a781..1bb80a00f 100644 --- a/src/routes/Player/Player.js +++ b/src/routes/Player/Player.js @@ -45,6 +45,7 @@ const Player = ({ urlParams, queryParams }) => { const routeFocused = useRouteFocused(); const toast = useToast(); + const [volume, setVolume] = React.useState(video.state?.volume || 0); const [seeking, setSeeking] = React.useState(false); const [casting, setCasting] = React.useState(() => { @@ -532,6 +533,12 @@ const Player = ({ urlParams, queryParams }) => { } }, [settings.pauseOnMinimize, shell.windowClosed, shell.windowHidden]); + React.useEffect(() => { + if (video?.state?.volume) { + setVolume(video.state.volume); + } + }, [video.state.volume]); + React.useLayoutEffect(() => { const onKeyDown = (event) => { switch (event.code) { @@ -628,6 +635,17 @@ const Player = ({ urlParams, queryParams }) => { onIncreaseSubtitlesDelay(); break; } + case 'KeyM': { + if (!menusOpen && !nextVideoPopupOpen && video.state.volume !== null) { + if (video.state.volume) { + onVolumeChangeRequested(0); + } else { + onVolumeChangeRequested(volume); + } + } + + break; + } case 'Minus': { onUpdateSubtitlesSize(-1); break; From 4a16680e5553549fde70c8a78570c3df8d094efd Mon Sep 17 00:00:00 2001 From: Botzy Date: Wed, 27 Aug 2025 14:09:33 +0300 Subject: [PATCH 2/3] feat(Settings): added M as mute toggle shortcut --- package-lock.json | 8 ++++---- package.json | 2 +- src/routes/Settings/Shortcuts/Shortcuts.tsx | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7d5ed4487..413f144a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "react-i18next": "^15.1.3", "react-is": "18.3.1", "spatial-navigation-polyfill": "github:Stremio/spatial-navigation#64871b1422466f5f45d24ebc8bbd315b2ebab6a6", - "stremio-translations": "github:Stremio/stremio-translations#abe7684165a031755e9aee39da26daa806ba7824", + "stremio-translations": "github:Stremio/stremio-translations#d0abbc1c93d30e597a7d50517fa404844cbcd5c8", "url": "0.11.4", "use-long-press": "^3.2.0" }, @@ -13433,9 +13433,9 @@ } }, "node_modules/stremio-translations": { - "version": "1.44.12", - "resolved": "git+ssh://git@github.com/Stremio/stremio-translations.git#abe7684165a031755e9aee39da26daa806ba7824", - "integrity": "sha512-bMpdJTFZqgemdoOQAARMPG7XaFgeu/zW/0vHmzavTM9DYUNIGuQaTC5RbVXIIII00RLOXoGLYf+dsxRVFiS9mA==", + "version": "1.44.13", + "resolved": "git+ssh://git@github.com/Stremio/stremio-translations.git#d0abbc1c93d30e597a7d50517fa404844cbcd5c8", + "integrity": "sha512-FBPYWZx0Z+FFtJkfI7jhY+gAP7pxz0WHe99B5JxH5GeEEIwlYKlcT79sDKVkkhMjBH4Pe492tnV5DWEC7VARAA==", "license": "MIT" }, "node_modules/string_decoder": { diff --git a/package.json b/package.json index ffcaef6b2..d29cef7a2 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "react-i18next": "^15.1.3", "react-is": "18.3.1", "spatial-navigation-polyfill": "github:Stremio/spatial-navigation#64871b1422466f5f45d24ebc8bbd315b2ebab6a6", - "stremio-translations": "github:Stremio/stremio-translations#abe7684165a031755e9aee39da26daa806ba7824", + "stremio-translations": "github:Stremio/stremio-translations#d0abbc1c93d30e597a7d50517fa404844cbcd5c8", "url": "0.11.4", "use-long-press": "^3.2.0" }, diff --git a/src/routes/Settings/Shortcuts/Shortcuts.tsx b/src/routes/Settings/Shortcuts/Shortcuts.tsx index d852280a6..2bced1bb3 100644 --- a/src/routes/Settings/Shortcuts/Shortcuts.tsx +++ b/src/routes/Settings/Shortcuts/Shortcuts.tsx @@ -41,6 +41,11 @@ const Shortcuts = forwardRef((_, ref) => { +