mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
Compare commits
6 commits
739c1d6b61
...
1e168a6f3d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e168a6f3d | ||
|
|
da675cd56c | ||
|
|
9b3b0d67ba | ||
|
|
fc2d906a42 | ||
|
|
7046622fb6 | ||
|
|
e8bee4997a |
6 changed files with 49 additions and 11 deletions
|
|
@ -1808,8 +1808,8 @@ packages:
|
|||
base64-js@1.5.1:
|
||||
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
||||
|
||||
baseline-browser-mapping@2.8.7:
|
||||
resolution: {integrity: sha512-bxxN2M3a4d1CRoQC//IqsR5XrLh0IJ8TCv2x6Y9N0nckNz/rTjZB3//GGscZziZOxmjP55rzxg/ze7usFI9FqQ==}
|
||||
baseline-browser-mapping@2.9.14:
|
||||
resolution: {integrity: sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==}
|
||||
hasBin: true
|
||||
|
||||
batch@0.6.1:
|
||||
|
|
@ -1907,8 +1907,8 @@ packages:
|
|||
caniuse-api@3.0.0:
|
||||
resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==}
|
||||
|
||||
caniuse-lite@1.0.30001745:
|
||||
resolution: {integrity: sha512-ywt6i8FzvdgrrrGbr1jZVObnVv6adj+0if2/omv9cmR2oiZs30zL4DIyaptKcbOrBdOIc74QTMoJvSE2QHh5UQ==}
|
||||
caniuse-lite@1.0.30001763:
|
||||
resolution: {integrity: sha512-mh/dGtq56uN98LlNX9qdbKnzINhX0QzhiWBFEkFfsFO4QyCvL8YegrJAazCwXIeqkIob8BlZPGM3xdnY+sgmvQ==}
|
||||
|
||||
centra@2.7.0:
|
||||
resolution: {integrity: sha512-PbFMgMSrmgx6uxCdm57RUos9Tc3fclMvhLSATYN39XsDV29B89zZ3KA89jmY0vwSGazyU+uerqwa6t+KaodPcg==}
|
||||
|
|
@ -7125,7 +7125,7 @@ snapshots:
|
|||
autoprefixer@10.4.21(postcss@8.5.6):
|
||||
dependencies:
|
||||
browserslist: 4.26.2
|
||||
caniuse-lite: 1.0.30001745
|
||||
caniuse-lite: 1.0.30001763
|
||||
fraction.js: 4.3.7
|
||||
normalize-range: 0.1.2
|
||||
picocolors: 1.1.1
|
||||
|
|
@ -7226,7 +7226,7 @@ snapshots:
|
|||
|
||||
base64-js@1.5.1: {}
|
||||
|
||||
baseline-browser-mapping@2.8.7: {}
|
||||
baseline-browser-mapping@2.9.14: {}
|
||||
|
||||
batch@0.6.1: {}
|
||||
|
||||
|
|
@ -7277,8 +7277,8 @@ snapshots:
|
|||
|
||||
browserslist@4.26.2:
|
||||
dependencies:
|
||||
baseline-browser-mapping: 2.8.7
|
||||
caniuse-lite: 1.0.30001745
|
||||
baseline-browser-mapping: 2.9.14
|
||||
caniuse-lite: 1.0.30001763
|
||||
electron-to-chromium: 1.5.224
|
||||
node-releases: 2.0.21
|
||||
update-browserslist-db: 1.1.3(browserslist@4.26.2)
|
||||
|
|
@ -7338,11 +7338,11 @@ snapshots:
|
|||
caniuse-api@3.0.0:
|
||||
dependencies:
|
||||
browserslist: 4.26.2
|
||||
caniuse-lite: 1.0.30001745
|
||||
caniuse-lite: 1.0.30001763
|
||||
lodash.memoize: 4.1.2
|
||||
lodash.uniq: 4.5.0
|
||||
|
||||
caniuse-lite@1.0.30001745: {}
|
||||
caniuse-lite@1.0.30001763: {}
|
||||
|
||||
centra@2.7.0:
|
||||
dependencies:
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@
|
|||
"label": "SETTINGS_SHORTCUT_VOLUME_DOWN",
|
||||
"combos": [["ArrowDown"]]
|
||||
},
|
||||
{
|
||||
"name": "mute",
|
||||
"label": "SETTINGS_SHORTCUT_MUTE",
|
||||
"combos": [["M"]]
|
||||
},
|
||||
{
|
||||
"name": "subtitlesSize",
|
||||
"label": "SETTINGS_SHORTCUT_SUBTITLES_SIZE",
|
||||
|
|
|
|||
|
|
@ -361,6 +361,7 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
forceTranscoding: forceTranscoding || casting,
|
||||
maxAudioChannels: settings.surroundSound ? 32 : 2,
|
||||
hardwareDecoding: settings.hardwareDecoding,
|
||||
assSubtitlesStyling: settings.assSubtitlesStyling,
|
||||
videoMode: settings.videoMode,
|
||||
platform: platform.name,
|
||||
streamingServerURL: streamingServer.baseUrl ?
|
||||
|
|
@ -568,7 +569,7 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
const videoId = player.selected ? player.selected?.streamRequest?.path?.id : null;
|
||||
const video = metaItem ? metaItem.videos.find(({ id }) => id === videoId) : null;
|
||||
|
||||
const videoInfo = video && video.season && video.episode ? ` (${video.season}x${video.episode})`: null;
|
||||
const videoInfo = video && video.season && video.episode ? ` (${video.season}x${video.episode})` : null;
|
||||
const videoTitle = video ? `${video.title}${videoInfo}` : null;
|
||||
const metaTitle = metaItem ? metaItem.name : null;
|
||||
const imageUrl = metaItem ? metaItem.logo : null;
|
||||
|
|
@ -624,6 +625,10 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
}
|
||||
}, [menusOpen, nextVideoPopupOpen, video.state.time, onSeekRequested]);
|
||||
|
||||
onShortcut('mute', () => {
|
||||
video.state.muted === true ? onUnmuteRequested() : onMuteRequested();
|
||||
}, [video.state.muted]);
|
||||
|
||||
onShortcut('volumeUp', () => {
|
||||
if (!menusOpen && !nextVideoPopupOpen && video.state.volume !== null) {
|
||||
onVolumeChangeRequested(Math.min(video.state.volume + 5, 200));
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ const Player = forwardRef<HTMLDivElement, Props>(({ profile }: Props, ref) => {
|
|||
subtitlesTextColorInput,
|
||||
subtitlesBackgroundColorInput,
|
||||
subtitlesOutlineColorInput,
|
||||
assSubtitlesStylingToggle,
|
||||
audioLanguageSelect,
|
||||
surroundSoundToggle,
|
||||
seekTimeDurationSelect,
|
||||
|
|
@ -65,6 +66,15 @@ const Player = forwardRef<HTMLDivElement, Props>(({ profile }: Props, ref) => {
|
|||
{...subtitlesOutlineColorInput}
|
||||
/>
|
||||
</Option>
|
||||
{
|
||||
shell.active &&
|
||||
<Option label={'SETTINGS_ASS_SUBTITLES_STYLING'}>
|
||||
<Toggle
|
||||
tabIndex={-1}
|
||||
{...assSubtitlesStylingToggle}
|
||||
/>
|
||||
</Option>
|
||||
}
|
||||
</Category>
|
||||
<Category icon={'volume-medium'} label={'SETTINGS_SECTION_AUDIO'}>
|
||||
<Option label={'SETTINGS_DEFAULT_AUDIO_TRACK'}>
|
||||
|
|
|
|||
|
|
@ -92,6 +92,22 @@ const usePlayerOptions = (profile: Profile) => {
|
|||
}
|
||||
}), [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(() => ({
|
||||
value: profile.settings.subtitlesOutlineColor,
|
||||
onChange: (value: string) => {
|
||||
|
|
@ -341,6 +357,7 @@ const usePlayerOptions = (profile: Profile) => {
|
|||
subtitlesTextColorInput,
|
||||
subtitlesBackgroundColorInput,
|
||||
subtitlesOutlineColorInput,
|
||||
assSubtitlesStylingToggle,
|
||||
audioLanguageSelect,
|
||||
surroundSoundToggle,
|
||||
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,
|
||||
subtitlesSize: number,
|
||||
subtitlesTextColor: string,
|
||||
assSubtitlesStyling: boolean,
|
||||
surroundSound: boolean,
|
||||
pauseOnMinimize: boolean,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue