mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
Merge e8bee4997a into da675cd56c
This commit is contained in:
commit
1e168a6f3d
4 changed files with 29 additions and 0 deletions
|
|
@ -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 ?
|
||||||
|
|
|
||||||
|
|
@ -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'}>
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
1
src/types/models/Ctx.d.ts
vendored
1
src/types/models/Ctx.d.ts
vendored
|
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue