diff --git a/src/routes/Settings/Settings.js b/src/routes/Settings/Settings.js index 9ca68fd52..85c790094 100644 --- a/src/routes/Settings/Settings.js +++ b/src/routes/Settings/Settings.js @@ -28,6 +28,7 @@ const Settings = () => { subtitlesTextColorInput, subtitlesBackgroundColorInput, subtitlesOutlineColorInput, + audioLanguageSelect, seekTimeDurationSelect, bingeWatchingCheckbox, playInBackgroundCheckbox, @@ -310,6 +311,15 @@ const Settings = () => { {...subtitlesOutlineColorInput} /> +
+
+
Audio Language
+
+ +
Rewind & Fast-forward duration
diff --git a/src/routes/Settings/useProfileSettingsInputs.js b/src/routes/Settings/useProfileSettingsInputs.js index 57f444d01..429b12dc8 100644 --- a/src/routes/Settings/useProfileSettingsInputs.js +++ b/src/routes/Settings/useProfileSettingsInputs.js @@ -111,6 +111,25 @@ const useProfileSettingsInputs = (profile) => { }); } }), [profile.settings]); + const audioLanguageSelect = useDeepEqualMemo(() => ({ + options: Object.keys(languageNames).map((code) => ({ + value: code, + label: languageNames[code] + })), + selected: [profile.settings.audioLanguage], + onSelect: (event) => { + core.transport.dispatch({ + action: 'Ctx', + args: { + action: 'UpdateSettings', + args: { + ...profile.settings, + audioLanguage: event.value + } + } + }); + } + }), [profile.settings]); const seekTimeDurationSelect = useDeepEqualMemo(() => ({ options: CONSTANTS.SEEK_TIME_DURATIONS.map((size) => ({ value: `${size}`, @@ -215,6 +234,7 @@ const useProfileSettingsInputs = (profile) => { subtitlesTextColorInput, subtitlesBackgroundColorInput, subtitlesOutlineColorInput, + audioLanguageSelect, seekTimeDurationSelect, bingeWatchingCheckbox, playInBackgroundCheckbox,