diff --git a/src/routes/Settings/Settings.js b/src/routes/Settings/Settings.js index 1baeb5511..225c66f35 100644 --- a/src/routes/Settings/Settings.js +++ b/src/routes/Settings/Settings.js @@ -34,6 +34,7 @@ const Settings = () => { subtitlesBackgroundColorInput, subtitlesOutlineColorInput, audioLanguageSelect, + surroundSoundCheckbox, seekTimeDurationSelect, seekShortTimeDurationSelect, escExitFullscreenCheckbox, @@ -405,6 +406,16 @@ const Settings = () => { {...audioLanguageSelect} /> +
+
+
{ t('SETTINGS_SURROUND_SOUND') }
+
+ +
diff --git a/src/routes/Settings/useProfileSettingsInputs.js b/src/routes/Settings/useProfileSettingsInputs.js index 2c2f39c88..64b1beb17 100644 --- a/src/routes/Settings/useProfileSettingsInputs.js +++ b/src/routes/Settings/useProfileSettingsInputs.js @@ -135,6 +135,21 @@ const useProfileSettingsInputs = (profile) => { }); } }), [profile.settings]); + const surroundSoundCheckbox = React.useMemo(() => ({ + checked: profile.settings.surroundSound, + onClick: () => { + core.transport.dispatch({ + action: 'Ctx', + args: { + action: 'UpdateSettings', + args: { + ...profile.settings, + surroundSound: !profile.settings.surroundSound + } + } + }); + } + }), [profile.settings]); const escExitFullscreenCheckbox = React.useMemo(() => ({ checked: profile.settings.escExitFullscreen, onClick: () => { @@ -307,6 +322,7 @@ const useProfileSettingsInputs = (profile) => { subtitlesBackgroundColorInput, subtitlesOutlineColorInput, audioLanguageSelect, + surroundSoundCheckbox, escExitFullscreenCheckbox, seekTimeDurationSelect, seekShortTimeDurationSelect, diff --git a/src/types/models/Ctx.d.ts b/src/types/models/Ctx.d.ts index 54ee1dc4e..15050b2a5 100644 --- a/src/types/models/Ctx.d.ts +++ b/src/types/models/Ctx.d.ts @@ -37,6 +37,7 @@ type Settings = { subtitlesOutlineColor: string, subtitlesSize: number, subtitlesTextColor: string, + surroundSound: boolean, }; type Profile = {