This commit is contained in:
Tim 2026-01-10 23:08:04 +01:00 committed by GitHub
commit 1e168a6f3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 0 deletions

View file

@ -361,6 +361,7 @@ const Player = ({ urlParams, queryParams }) => {
forceTranscoding: forceTranscoding || casting, forceTranscoding: forceTranscoding || casting,
maxAudioChannels: settings.surroundSound ? 32 : 2, maxAudioChannels: settings.surroundSound ? 32 : 2,
hardwareDecoding: settings.hardwareDecoding, hardwareDecoding: settings.hardwareDecoding,
assSubtitlesStyling: settings.assSubtitlesStyling,
videoMode: settings.videoMode, videoMode: settings.videoMode,
platform: platform.name, platform: platform.name,
streamingServerURL: streamingServer.baseUrl ? streamingServerURL: streamingServer.baseUrl ?

View file

@ -19,6 +19,7 @@ const Player = forwardRef<HTMLDivElement, Props>(({ profile }: Props, ref) => {
subtitlesTextColorInput, subtitlesTextColorInput,
subtitlesBackgroundColorInput, subtitlesBackgroundColorInput,
subtitlesOutlineColorInput, subtitlesOutlineColorInput,
assSubtitlesStylingToggle,
audioLanguageSelect, audioLanguageSelect,
surroundSoundToggle, surroundSoundToggle,
seekTimeDurationSelect, seekTimeDurationSelect,
@ -65,6 +66,15 @@ const Player = forwardRef<HTMLDivElement, Props>(({ profile }: Props, ref) => {
{...subtitlesOutlineColorInput} {...subtitlesOutlineColorInput}
/> />
</Option> </Option>
{
shell.active &&
<Option label={'SETTINGS_ASS_SUBTITLES_STYLING'}>
<Toggle
tabIndex={-1}
{...assSubtitlesStylingToggle}
/>
</Option>
}
</Category> </Category>
<Category icon={'volume-medium'} label={'SETTINGS_SECTION_AUDIO'}> <Category icon={'volume-medium'} label={'SETTINGS_SECTION_AUDIO'}>
<Option label={'SETTINGS_DEFAULT_AUDIO_TRACK'}> <Option label={'SETTINGS_DEFAULT_AUDIO_TRACK'}>

View file

@ -92,6 +92,22 @@ const usePlayerOptions = (profile: Profile) => {
} }
}), [profile.settings]); }), [profile.settings]);
const assSubtitlesStylingToggle = useMemo(() => ({
checked: profile.settings.assSubtitlesStyling,
onClick: () => {
core.transport.dispatch({
action: 'Ctx',
args: {
action: 'UpdateSettings',
args: {
...profile.settings,
assSubtitlesStyling: !profile.settings.assSubtitlesStyling
}
}
});
}
}), [profile.settings]);
const subtitlesOutlineColorInput = useMemo(() => ({ const subtitlesOutlineColorInput = useMemo(() => ({
value: profile.settings.subtitlesOutlineColor, value: profile.settings.subtitlesOutlineColor,
onChange: (value: string) => { onChange: (value: string) => {
@ -341,6 +357,7 @@ const usePlayerOptions = (profile: Profile) => {
subtitlesTextColorInput, subtitlesTextColorInput,
subtitlesBackgroundColorInput, subtitlesBackgroundColorInput,
subtitlesOutlineColorInput, subtitlesOutlineColorInput,
assSubtitlesStylingToggle,
audioLanguageSelect, audioLanguageSelect,
surroundSoundToggle, surroundSoundToggle,
seekTimeDurationSelect, seekTimeDurationSelect,

View file

@ -42,6 +42,7 @@ type Settings = {
subtitlesOutlineColor: string, subtitlesOutlineColor: string,
subtitlesSize: number, subtitlesSize: number,
subtitlesTextColor: string, subtitlesTextColor: string,
assSubtitlesStyling: boolean,
surroundSound: boolean, surroundSound: boolean,
pauseOnMinimize: boolean, pauseOnMinimize: boolean,
}; };