mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 19:02:15 +00:00
Merge 9b57a1f8f7 into 585a84ccd6
This commit is contained in:
commit
d92237c840
6 changed files with 71 additions and 20 deletions
|
|
@ -17,9 +17,9 @@
|
|||
"@babel/runtime": "7.26.0",
|
||||
"@sentry/browser": "8.42.0",
|
||||
"@stremio/stremio-colors": "5.2.0",
|
||||
"@stremio/stremio-core-web": "0.49.4",
|
||||
"@stremio/stremio-core-web": "https://stremio.github.io/stremio-core/stremio-core-web/feat/profile-settings-video-mode/dev/stremio-stremio-core-web-0.49.4.tgz",
|
||||
"@stremio/stremio-icons": "5.7.1",
|
||||
"@stremio/stremio-video": "0.0.62",
|
||||
"@stremio/stremio-video": "github:Stremio/stremio-video#9175d51af4d4e296972a852c413c46a3dc31d9b6",
|
||||
"a-color-picker": "1.2.1",
|
||||
"bowser": "2.11.0",
|
||||
"buffer": "6.0.3",
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
"react-i18next": "^15.1.3",
|
||||
"react-is": "18.3.1",
|
||||
"spatial-navigation-polyfill": "github:Stremio/spatial-navigation#64871b1422466f5f45d24ebc8bbd315b2ebab6a6",
|
||||
"stremio-translations": "github:Stremio/stremio-translations#abe7684165a031755e9aee39da26daa806ba7824",
|
||||
"stremio-translations": "github:Stremio/stremio-translations#bfd692a69ec39dd7091068a41cb3904ce22afca8",
|
||||
"url": "0.11.4",
|
||||
"use-long-press": "^3.2.0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@ importers:
|
|||
specifier: 5.2.0
|
||||
version: 5.2.0
|
||||
'@stremio/stremio-core-web':
|
||||
specifier: 0.49.4
|
||||
version: 0.49.4
|
||||
specifier: https://stremio.github.io/stremio-core/stremio-core-web/feat/profile-settings-video-mode/dev/stremio-stremio-core-web-0.49.4.tgz
|
||||
version: https://stremio.github.io/stremio-core/stremio-core-web/feat/profile-settings-video-mode/dev/stremio-stremio-core-web-0.49.4.tgz
|
||||
'@stremio/stremio-icons':
|
||||
specifier: 5.7.1
|
||||
version: 5.7.1
|
||||
'@stremio/stremio-video':
|
||||
specifier: 0.0.62
|
||||
version: 0.0.62
|
||||
specifier: github:Stremio/stremio-video#9175d51af4d4e296972a852c413c46a3dc31d9b6
|
||||
version: https://codeload.github.com/Stremio/stremio-video/tar.gz/9175d51af4d4e296972a852c413c46a3dc31d9b6
|
||||
a-color-picker:
|
||||
specifier: 1.2.1
|
||||
version: 1.2.1
|
||||
|
|
@ -90,8 +90,8 @@ importers:
|
|||
specifier: github:Stremio/spatial-navigation#64871b1422466f5f45d24ebc8bbd315b2ebab6a6
|
||||
version: https://codeload.github.com/Stremio/spatial-navigation/tar.gz/64871b1422466f5f45d24ebc8bbd315b2ebab6a6
|
||||
stremio-translations:
|
||||
specifier: github:Stremio/stremio-translations#abe7684165a031755e9aee39da26daa806ba7824
|
||||
version: https://codeload.github.com/Stremio/stremio-translations/tar.gz/abe7684165a031755e9aee39da26daa806ba7824
|
||||
specifier: github:Stremio/stremio-translations#bfd692a69ec39dd7091068a41cb3904ce22afca8
|
||||
version: https://codeload.github.com/Stremio/stremio-translations/tar.gz/bfd692a69ec39dd7091068a41cb3904ce22afca8
|
||||
url:
|
||||
specifier: 0.11.4
|
||||
version: 0.11.4
|
||||
|
|
@ -1302,14 +1302,16 @@ packages:
|
|||
'@stremio/stremio-colors@5.2.0':
|
||||
resolution: {integrity: sha512-dYlPgu9W/H7c9s1zmW5tiDnRenaUa4Hg1QCyOg1lhOcgSfM/bVTi5nnqX+IfvGTTUNA0zgzh8hI3o3miwnZxTg==}
|
||||
|
||||
'@stremio/stremio-core-web@0.49.4':
|
||||
resolution: {integrity: sha512-K9LJGKXs8juV3pZOHH6thWTwOShAhjFt9bLL6K1VlORAe6AiieZ2uRp9wdOwFmPX+UgzWLIOd0r2aFXJ4OsJCw==}
|
||||
'@stremio/stremio-core-web@https://stremio.github.io/stremio-core/stremio-core-web/feat/profile-settings-video-mode/dev/stremio-stremio-core-web-0.49.4.tgz':
|
||||
resolution: {tarball: https://stremio.github.io/stremio-core/stremio-core-web/feat/profile-settings-video-mode/dev/stremio-stremio-core-web-0.49.4.tgz}
|
||||
version: 0.49.4
|
||||
|
||||
'@stremio/stremio-icons@5.7.1':
|
||||
resolution: {integrity: sha512-Z96p36LLX3G+ewMnFKmNZVsO/AtcHA33WQ3wGOYFubxiYADPRAkcLVU5rHIfiGSC9IUaUVhxQWTPVB9ScY4Q5Q==}
|
||||
|
||||
'@stremio/stremio-video@0.0.62':
|
||||
resolution: {integrity: sha512-lzm1sWLVN9Z3qr8mZm3MRLw7S9v7QYIe6swWava3Ao4sjhVc8jVlwzF5un0LcHxY8hQe0OjK7TDCvPRbw+spBQ==}
|
||||
'@stremio/stremio-video@https://codeload.github.com/Stremio/stremio-video/tar.gz/9175d51af4d4e296972a852c413c46a3dc31d9b6':
|
||||
resolution: {tarball: https://codeload.github.com/Stremio/stremio-video/tar.gz/9175d51af4d4e296972a852c413c46a3dc31d9b6}
|
||||
version: 0.0.63
|
||||
|
||||
'@stylistic/eslint-plugin-jsx@4.4.1':
|
||||
resolution: {integrity: sha512-83SInq4u7z71vWwGG+6ViOtlOmZ6tSrDkMPhrvdBBTGMLA0gs22WSdhQ4vZP3oJ5Xg4ythvqeUiFSedvVxzhyA==}
|
||||
|
|
@ -4527,9 +4529,9 @@ packages:
|
|||
resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
stremio-translations@https://codeload.github.com/Stremio/stremio-translations/tar.gz/abe7684165a031755e9aee39da26daa806ba7824:
|
||||
resolution: {tarball: https://codeload.github.com/Stremio/stremio-translations/tar.gz/abe7684165a031755e9aee39da26daa806ba7824}
|
||||
version: 1.44.12
|
||||
stremio-translations@https://codeload.github.com/Stremio/stremio-translations/tar.gz/bfd692a69ec39dd7091068a41cb3904ce22afca8:
|
||||
resolution: {tarball: https://codeload.github.com/Stremio/stremio-translations/tar.gz/bfd692a69ec39dd7091068a41cb3904ce22afca8}
|
||||
version: 1.44.13
|
||||
|
||||
string-length@4.0.2:
|
||||
resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==}
|
||||
|
|
@ -6561,13 +6563,13 @@ snapshots:
|
|||
|
||||
'@stremio/stremio-colors@5.2.0': {}
|
||||
|
||||
'@stremio/stremio-core-web@0.49.4':
|
||||
'@stremio/stremio-core-web@https://stremio.github.io/stremio-core/stremio-core-web/feat/profile-settings-video-mode/dev/stremio-stremio-core-web-0.49.4.tgz':
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.1
|
||||
|
||||
'@stremio/stremio-icons@5.7.1': {}
|
||||
|
||||
'@stremio/stremio-video@0.0.62':
|
||||
'@stremio/stremio-video@https://codeload.github.com/Stremio/stremio-video/tar.gz/9175d51af4d4e296972a852c413c46a3dc31d9b6':
|
||||
dependencies:
|
||||
buffer: 6.0.3
|
||||
color: 4.2.3
|
||||
|
|
@ -10283,7 +10285,7 @@ snapshots:
|
|||
es-errors: 1.3.0
|
||||
internal-slot: 1.1.0
|
||||
|
||||
stremio-translations@https://codeload.github.com/Stremio/stremio-translations/tar.gz/abe7684165a031755e9aee39da26daa806ba7824: {}
|
||||
stremio-translations@https://codeload.github.com/Stremio/stremio-translations/tar.gz/bfd692a69ec39dd7091068a41cb3904ce22afca8: {}
|
||||
|
||||
string-length@4.0.2:
|
||||
dependencies:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const langs = require('langs');
|
|||
const { useTranslation } = require('react-i18next');
|
||||
const { useRouteFocused } = require('stremio-router');
|
||||
const { useServices } = require('stremio/services');
|
||||
const { onFileDrop, useSettings, useFullscreen, useBinaryState, useToast, useStreamingServer, withCoreSuspender, CONSTANTS, useShell } = require('stremio/common');
|
||||
const { onFileDrop, useSettings, useFullscreen, useBinaryState, useToast, useStreamingServer, withCoreSuspender, CONSTANTS, useShell, usePlatform } = require('stremio/common');
|
||||
const { HorizontalNavBar, Transition, ContextMenu } = require('stremio/components');
|
||||
const BufferingLoader = require('./BufferingLoader');
|
||||
const VolumeChangeIndicator = require('./VolumeChangeIndicator');
|
||||
|
|
@ -43,6 +43,7 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
const statistics = useStatistics(player, streamingServer);
|
||||
const video = useVideo();
|
||||
const routeFocused = useRouteFocused();
|
||||
const platform = usePlatform();
|
||||
const toast = useToast();
|
||||
|
||||
const [seeking, setSeeking] = React.useState(false);
|
||||
|
|
@ -345,6 +346,8 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
forceTranscoding: forceTranscoding || casting,
|
||||
maxAudioChannels: settings.surroundSound ? 32 : 2,
|
||||
hardwareDecoding: settings.hardwareDecoding,
|
||||
videoMode: settings.videoMode,
|
||||
platform: platform.name,
|
||||
streamingServerURL: streamingServer.baseUrl ?
|
||||
casting ?
|
||||
streamingServer.baseUrl
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { ColorInput, MultiselectMenu, Toggle } from 'stremio/components';
|
|||
import { useServices } from 'stremio/services';
|
||||
import { Category, Option, Section } from '../components';
|
||||
import usePlayerOptions from './usePlayerOptions';
|
||||
import { usePlatform } from 'stremio/common';
|
||||
|
||||
type Props = {
|
||||
profile: Profile,
|
||||
|
|
@ -10,6 +11,7 @@ type Props = {
|
|||
|
||||
const Player = forwardRef<HTMLDivElement, Props>(({ profile }: Props, ref) => {
|
||||
const { shell } = useServices();
|
||||
const platform = usePlatform();
|
||||
|
||||
const {
|
||||
subtitlesLanguageSelect,
|
||||
|
|
@ -26,6 +28,7 @@ const Player = forwardRef<HTMLDivElement, Props>(({ profile }: Props, ref) => {
|
|||
bingeWatchingToggle,
|
||||
playInBackgroundToggle,
|
||||
hardwareDecodingToggle,
|
||||
videoModeSelect,
|
||||
pauseOnMinimizeToggle,
|
||||
} = usePlayerOptions(profile);
|
||||
|
||||
|
|
@ -129,6 +132,15 @@ const Player = forwardRef<HTMLDivElement, Props>(({ profile }: Props, ref) => {
|
|||
/>
|
||||
</Option>
|
||||
}
|
||||
{
|
||||
shell.active && platform.name === 'windows' &&
|
||||
<Option label={'SETTINGS_VIDEO_MODE'}>
|
||||
<MultiselectMenu
|
||||
className={'multiselect'}
|
||||
{...videoModeSelect}
|
||||
/>
|
||||
</Option>
|
||||
}
|
||||
{
|
||||
shell.active &&
|
||||
<Option label={'SETTINGS_PAUSE_MINIMIZED'}>
|
||||
|
|
|
|||
|
|
@ -287,6 +287,38 @@ const usePlayerOptions = (profile: Profile) => {
|
|||
}
|
||||
}), [profile.settings]);
|
||||
|
||||
const videoModeSelect = useMemo(() => ({
|
||||
options: [
|
||||
{
|
||||
value: null,
|
||||
label: t('SETTINGS_VIDEO_MODE_DEFAULT'),
|
||||
},
|
||||
{
|
||||
value: 'legacy',
|
||||
label: t('SETTINGS_VIDEO_MODE_LEGACY'),
|
||||
}
|
||||
],
|
||||
value: profile.settings.videoMode,
|
||||
title: () => {
|
||||
return profile.settings.videoMode === 'legacy' ?
|
||||
t('SETTINGS_VIDEO_MODE_LEGACY')
|
||||
:
|
||||
t('SETTINGS_VIDEO_MODE_DEFAULT');
|
||||
},
|
||||
onSelect: (value: string | null) => {
|
||||
core.transport.dispatch({
|
||||
action: 'Ctx',
|
||||
args: {
|
||||
action: 'UpdateSettings',
|
||||
args: {
|
||||
...profile.settings,
|
||||
videoMode: value,
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}), [profile.settings]);
|
||||
|
||||
const pauseOnMinimizeToggle = useMemo(() => ({
|
||||
checked: profile.settings.pauseOnMinimize,
|
||||
onClick: () => {
|
||||
|
|
@ -318,6 +350,7 @@ const usePlayerOptions = (profile: Profile) => {
|
|||
bingeWatchingToggle,
|
||||
playInBackgroundToggle,
|
||||
hardwareDecodingToggle,
|
||||
videoModeSelect,
|
||||
pauseOnMinimizeToggle,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
1
src/types/models/Ctx.d.ts
vendored
1
src/types/models/Ctx.d.ts
vendored
|
|
@ -19,6 +19,7 @@ type Settings = {
|
|||
autoFrameRateMatching: boolean,
|
||||
bingeWatching: boolean,
|
||||
hardwareDecoding: boolean,
|
||||
videoMode: string | null,
|
||||
escExitFullscreen: boolean,
|
||||
interfaceLanguage: string,
|
||||
quitOnClose: boolean,
|
||||
|
|
|
|||
Loading…
Reference in a new issue