mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-05-16 17:22:38 +00:00
Merge pull request #1219 from Stremio/feat/player-add-hdr-badge
Player: Add HDR badge
This commit is contained in:
commit
d1090032ea
7 changed files with 47 additions and 16 deletions
|
|
@ -18,8 +18,8 @@
|
||||||
"@sentry/browser": "8.42.0",
|
"@sentry/browser": "8.42.0",
|
||||||
"@stremio/stremio-colors": "5.2.0",
|
"@stremio/stremio-colors": "5.2.0",
|
||||||
"@stremio/stremio-core-web": "0.56.4",
|
"@stremio/stremio-core-web": "0.56.4",
|
||||||
"@stremio/stremio-icons": "5.8.0",
|
"@stremio/stremio-icons": "5.10.0",
|
||||||
"@stremio/stremio-video": "0.0.75",
|
"@stremio/stremio-video": "0.0.76",
|
||||||
"a-color-picker": "1.2.1",
|
"a-color-picker": "1.2.1",
|
||||||
"bowser": "2.11.0",
|
"bowser": "2.11.0",
|
||||||
"buffer": "6.0.3",
|
"buffer": "6.0.3",
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,11 @@ importers:
|
||||||
specifier: 0.56.4
|
specifier: 0.56.4
|
||||||
version: 0.56.4
|
version: 0.56.4
|
||||||
'@stremio/stremio-icons':
|
'@stremio/stremio-icons':
|
||||||
specifier: 5.8.0
|
specifier: 5.10.0
|
||||||
version: 5.8.0
|
version: 5.10.0
|
||||||
'@stremio/stremio-video':
|
'@stremio/stremio-video':
|
||||||
specifier: 0.0.75
|
specifier: 0.0.76
|
||||||
version: 0.0.75
|
version: 0.0.76
|
||||||
a-color-picker:
|
a-color-picker:
|
||||||
specifier: 1.2.1
|
specifier: 1.2.1
|
||||||
version: 1.2.1
|
version: 1.2.1
|
||||||
|
|
@ -1123,11 +1123,11 @@ packages:
|
||||||
'@stremio/stremio-core-web@0.56.4':
|
'@stremio/stremio-core-web@0.56.4':
|
||||||
resolution: {integrity: sha512-tFAMYgKrJ1bkvHRMpxDykM/844sDjgRPFk6FLhjQiwh01OHIyEgDqGo/NgwFM+CuMR4mW676SDvwNHkK0Xqg3w==}
|
resolution: {integrity: sha512-tFAMYgKrJ1bkvHRMpxDykM/844sDjgRPFk6FLhjQiwh01OHIyEgDqGo/NgwFM+CuMR4mW676SDvwNHkK0Xqg3w==}
|
||||||
|
|
||||||
'@stremio/stremio-icons@5.8.0':
|
'@stremio/stremio-icons@5.10.0':
|
||||||
resolution: {integrity: sha512-IVUvQbIWfA4YEHCTed7v/sdQJCJ+OOCf84LTWpkE2W6GLQ+15WHcMEJrVkE1X3ekYJnGg3GjT0KLO6tKSU0P4w==}
|
resolution: {integrity: sha512-Zw/vGC3D2yeQfk8xv/tfMJTDvbCPOI91tBg4XpR2+EgbZSX8Xvm7Vz457PIhFPhTAwdOPHp0VX0M3gzjbt0zOg==}
|
||||||
|
|
||||||
'@stremio/stremio-video@0.0.75':
|
'@stremio/stremio-video@0.0.76':
|
||||||
resolution: {integrity: sha512-oKXMq156BVagzziWoTsmgNYABCSfwV9hR/TM6+JR4lne5pW4qmUN17ba/Fxsr+USKHeCKUaz1u0asKBj06HfyA==}
|
resolution: {integrity: sha512-q/mCnp4mBReWbtreyeYAf0wD8z+jL4wA5GdkOLPY8o5OPZPUv9Qa9p3FNkK3CMVWf3TP1FzeNj3KYKqUVf5/2Q==}
|
||||||
|
|
||||||
'@stylistic/eslint-plugin-jsx@4.4.1':
|
'@stylistic/eslint-plugin-jsx@4.4.1':
|
||||||
resolution: {integrity: sha512-83SInq4u7z71vWwGG+6ViOtlOmZ6tSrDkMPhrvdBBTGMLA0gs22WSdhQ4vZP3oJ5Xg4ythvqeUiFSedvVxzhyA==}
|
resolution: {integrity: sha512-83SInq4u7z71vWwGG+6ViOtlOmZ6tSrDkMPhrvdBBTGMLA0gs22WSdhQ4vZP3oJ5Xg4ythvqeUiFSedvVxzhyA==}
|
||||||
|
|
@ -5874,9 +5874,9 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime': 7.24.1
|
'@babel/runtime': 7.24.1
|
||||||
|
|
||||||
'@stremio/stremio-icons@5.8.0': {}
|
'@stremio/stremio-icons@5.10.0': {}
|
||||||
|
|
||||||
'@stremio/stremio-video@0.0.75':
|
'@stremio/stremio-video@0.0.76':
|
||||||
dependencies:
|
dependencies:
|
||||||
buffer: 6.0.3
|
buffer: 6.0.3
|
||||||
color: 4.2.3
|
color: 4.2.3
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ const NavMenu = require('./NavMenu');
|
||||||
const styles = require('./styles');
|
const styles = require('./styles');
|
||||||
const { t } = require('i18next');
|
const { t } = require('i18next');
|
||||||
|
|
||||||
const HorizontalNavBar = React.memo(({ className, route, query, title, backButton, searchBar, fullscreenButton, navMenu, ...props }) => {
|
const HorizontalNavBar = React.memo(({ className, route, query, title, backButton, searchBar, fullscreenButton, navMenu, hdrInfo, ...props }) => {
|
||||||
const backButtonOnClick = React.useCallback(() => {
|
const backButtonOnClick = React.useCallback(() => {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
@ -53,6 +53,14 @@ const HorizontalNavBar = React.memo(({ className, route, query, title, backButto
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
<div className={styles['buttons-container']}>
|
<div className={styles['buttons-container']}>
|
||||||
|
{
|
||||||
|
hdrInfo && (hdrInfo.gamma === 'pq' || hdrInfo.gamma === 'hlg') ?
|
||||||
|
<div className={styles['hdr-indicator']} title={hdrInfo.gamma === 'pq' ? 'HDR10' : 'HLG'}>
|
||||||
|
<Icon className={styles['icon']} name={'hdr'} />
|
||||||
|
</div>
|
||||||
|
:
|
||||||
|
null
|
||||||
|
}
|
||||||
{
|
{
|
||||||
!isIOSPWA && fullscreenButton ?
|
!isIOSPWA && fullscreenButton ?
|
||||||
<Button className={styles['button-container']} title={fullscreen ? t('EXIT_FULLSCREEN') : t('ENTER_FULLSCREEN')} tabIndex={-1} onClick={fullscreen ? exitFullscreen : requestFullscreen}>
|
<Button className={styles['button-container']} title={fullscreen ? t('EXIT_FULLSCREEN') : t('ENTER_FULLSCREEN')} tabIndex={-1} onClick={fullscreen ? exitFullscreen : requestFullscreen}>
|
||||||
|
|
@ -82,7 +90,10 @@ HorizontalNavBar.propTypes = {
|
||||||
backButton: PropTypes.bool,
|
backButton: PropTypes.bool,
|
||||||
searchBar: PropTypes.bool,
|
searchBar: PropTypes.bool,
|
||||||
fullscreenButton: PropTypes.bool,
|
fullscreenButton: PropTypes.bool,
|
||||||
navMenu: PropTypes.bool
|
navMenu: PropTypes.bool,
|
||||||
|
hdrInfo: PropTypes.shape({
|
||||||
|
gamma: PropTypes.string,
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = HorizontalNavBar;
|
module.exports = HorizontalNavBar;
|
||||||
|
|
|
||||||
|
|
@ -57,10 +57,30 @@
|
||||||
.buttons-container {
|
.buttons-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hdr-indicator {
|
||||||
|
flex: none;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 3.5rem;
|
||||||
|
padding: 0 0.5rem;
|
||||||
|
opacity: 0.6;
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
flex: none;
|
||||||
|
width: 3rem;
|
||||||
|
height: 1.5rem;
|
||||||
|
color: var(--primary-foreground-color);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.button-container {
|
.button-container {
|
||||||
flex: none;
|
flex: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -916,6 +916,7 @@ const Player = ({ urlParams, queryParams }) => {
|
||||||
title={player.title !== null ? player.title : ''}
|
title={player.title !== null ? player.title : ''}
|
||||||
backButton={true}
|
backButton={true}
|
||||||
fullscreenButton={true}
|
fullscreenButton={true}
|
||||||
|
hdrInfo={video.state.hdrInfo}
|
||||||
onMouseMove={onBarMouseMove}
|
onMouseMove={onBarMouseMove}
|
||||||
onMouseOver={onBarMouseMove}
|
onMouseOver={onBarMouseMove}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@ html:not(.active-slider-within) {
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
box-shadow: 0 0 8rem 6rem @color-background-dark5;
|
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,7 +101,6 @@ html:not(.active-slider-within) {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
box-shadow: 0 0 8rem 8rem @color-background-dark5;
|
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ const useVideo = () => {
|
||||||
muted: null,
|
muted: null,
|
||||||
playbackSpeed: null,
|
playbackSpeed: null,
|
||||||
videoParams: null,
|
videoParams: null,
|
||||||
|
hdrInfo: null,
|
||||||
audioTracks: [],
|
audioTracks: [],
|
||||||
selectedAudioTrackId: null,
|
selectedAudioTrackId: null,
|
||||||
subtitlesTracks: [],
|
subtitlesTracks: [],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue