diff --git a/src/common/Shortcuts/shortcuts.json b/src/common/Shortcuts/shortcuts.json index 86abe5d73..a3ac0f8fe 100644 --- a/src/common/Shortcuts/shortcuts.json +++ b/src/common/Shortcuts/shortcuts.json @@ -59,6 +59,11 @@ "label": "SETTINGS_SHORTCUT_VOLUME_DOWN", "combos": [["ArrowDown"]] }, + { + "name": "mute", + "label": "SETTINGS_SHORTCUT_MUTE", + "combos": [["M"]] + }, { "name": "subtitlesSize", "label": "SETTINGS_SHORTCUT_SUBTITLES_SIZE", diff --git a/src/routes/Player/Player.js b/src/routes/Player/Player.js index f2697db58..3ae2f066c 100644 --- a/src/routes/Player/Player.js +++ b/src/routes/Player/Player.js @@ -568,7 +568,7 @@ const Player = ({ urlParams, queryParams }) => { const videoId = player.selected ? player.selected?.streamRequest?.path?.id : null; const video = metaItem ? metaItem.videos.find(({ id }) => id === videoId) : null; - const videoInfo = video && video.season && video.episode ? ` (${video.season}x${video.episode})`: null; + const videoInfo = video && video.season && video.episode ? ` (${video.season}x${video.episode})` : null; const videoTitle = video ? `${video.title}${videoInfo}` : null; const metaTitle = metaItem ? metaItem.name : null; const imageUrl = metaItem ? metaItem.logo : null; @@ -624,6 +624,10 @@ const Player = ({ urlParams, queryParams }) => { } }, [menusOpen, nextVideoPopupOpen, video.state.time, onSeekRequested]); + onShortcut('mute', () => { + video.state.muted === true ? onUnmuteRequested() : onMuteRequested(); + }, [video.state.muted]); + onShortcut('volumeUp', () => { if (!menusOpen && !nextVideoPopupOpen && video.state.volume !== null) { onVolumeChangeRequested(Math.min(video.state.volume + 5, 200));