mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-05-24 04:22:12 +00:00
Merge 40135197ac into 87ccc591df
This commit is contained in:
commit
692077688b
4 changed files with 29 additions and 0 deletions
1
src/core/types/models/Ctx.d.ts
vendored
1
src/core/types/models/Ctx.d.ts
vendored
|
|
@ -19,6 +19,7 @@ type Settings = {
|
|||
autoFrameRateMatching: boolean,
|
||||
bingeWatching: boolean,
|
||||
hardwareDecoding: boolean,
|
||||
gpuVideoProcessing: boolean,
|
||||
videoMode: string | null,
|
||||
escExitFullscreen: boolean,
|
||||
interfaceLanguage: string,
|
||||
|
|
|
|||
|
|
@ -411,6 +411,7 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
maxAudioChannels: settings.surroundSound ? 32 : 2,
|
||||
hardwareDecoding: settings.hardwareDecoding,
|
||||
assSubtitlesStyling: settings.assSubtitlesStyling,
|
||||
gpuVideoProcessing: settings.gpuVideoProcessing,
|
||||
videoMode: settings.videoMode,
|
||||
platform: platform.name,
|
||||
streamingServerURL: streamingServer.baseUrl ?
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ const Player = forwardRef<HTMLDivElement, Props>(({ profile }: Props, ref) => {
|
|||
bingeWatchingToggle,
|
||||
playInBackgroundToggle,
|
||||
hardwareDecodingToggle,
|
||||
gpuVideoProcessingToggle,
|
||||
videoModeSelect,
|
||||
pauseOnMinimizeToggle,
|
||||
} = usePlayerOptions(profile);
|
||||
|
|
@ -131,6 +132,15 @@ const Player = forwardRef<HTMLDivElement, Props>(({ profile }: Props, ref) => {
|
|||
/>
|
||||
</Option>
|
||||
}
|
||||
{
|
||||
shell.active &&
|
||||
<Option label={'SETTINGS_GPU_VIDEO_PROCESSING'}>
|
||||
<Toggle
|
||||
tabIndex={-1}
|
||||
{...gpuVideoProcessingToggle}
|
||||
/>
|
||||
</Option>
|
||||
}
|
||||
{
|
||||
shell.active && platform.name === 'windows' &&
|
||||
<Option label={'SETTINGS_VIDEO_MODE'}>
|
||||
|
|
|
|||
|
|
@ -303,6 +303,22 @@ const usePlayerOptions = (profile: Profile) => {
|
|||
}
|
||||
}), [profile.settings]);
|
||||
|
||||
const gpuVideoProcessingToggle = useMemo(() => ({
|
||||
checked: profile.settings.gpuVideoProcessing,
|
||||
onClick: () => {
|
||||
core.transport.dispatch({
|
||||
action: 'Ctx',
|
||||
args: {
|
||||
action: 'UpdateSettings',
|
||||
args: {
|
||||
...profile.settings,
|
||||
gpuVideoProcessing: !profile.settings.gpuVideoProcessing
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}), [profile.settings]);
|
||||
|
||||
const videoModeSelect = useMemo(() => ({
|
||||
options: [
|
||||
{
|
||||
|
|
@ -367,6 +383,7 @@ const usePlayerOptions = (profile: Profile) => {
|
|||
bingeWatchingToggle,
|
||||
playInBackgroundToggle,
|
||||
hardwareDecodingToggle,
|
||||
gpuVideoProcessingToggle,
|
||||
videoModeSelect,
|
||||
pauseOnMinimizeToggle,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue