diff --git a/package.json b/package.json index 1e769dbd..817408a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "movie-web", - "version": "3.0.12", + "version": "3.0.13", "private": true, "homepage": "https://movie-web.app", "dependencies": { diff --git a/src/hooks/useVolumeToggle.ts b/src/hooks/useVolumeToggle.ts index 636b787b..c6b8388f 100644 --- a/src/hooks/useVolumeToggle.ts +++ b/src/hooks/useVolumeToggle.ts @@ -7,12 +7,12 @@ export function useVolumeControl(descriptor: string) { const controls = useControls(descriptor); const mediaPlaying = useMediaPlaying(descriptor); - const toggleVolume = () => { + const toggleVolume = (isKeyboardEvent = false) => { if (mediaPlaying.volume > 0) { setStoredVolume(mediaPlaying.volume); - controls.setVolume(0); + controls.setVolume(0, isKeyboardEvent); } else { - controls.setVolume(storedVolume > 0 ? storedVolume : 1); + controls.setVolume(storedVolume > 0 ? storedVolume : 1, isKeyboardEvent); } }; diff --git a/src/video/components/actions/KeyboardShortcutsAction.tsx b/src/video/components/actions/KeyboardShortcutsAction.tsx index ba5ffc32..c87b6f68 100644 --- a/src/video/components/actions/KeyboardShortcutsAction.tsx +++ b/src/video/components/actions/KeyboardShortcutsAction.tsx @@ -60,7 +60,7 @@ export function KeyboardShortcutsAction() { // Mute case "m": - toggleVolume(); + toggleVolume(true); break; // Decrease volume