Merge pull request #966 from Stremio/fix/player-indicator-subtitles-menu

Player: Hide subtitles delay indicator if subtitles menu is open
This commit is contained in:
Tim 2025-07-03 11:30:18 +02:00 committed by GitHub
commit aef0ecb5be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -22,9 +22,10 @@ type VideoState = Record<string, number>;
type Props = {
className: string,
videoState: VideoState,
disabled: boolean,
};
const Indicator = ({ className, videoState }: Props) => {
const Indicator = ({ className, videoState, disabled }: Props) => {
const timeout = useRef<NodeJS.Timeout | null>(null);
const prevVideoState = useRef<VideoState>(videoState);
@ -60,7 +61,7 @@ const Indicator = ({ className, videoState }: Props) => {
}, [videoState]);
return (
<Transition when={shown} name={'fade'}>
<Transition when={shown && !disabled} name={'fade'}>
<div className={classNames(className, styles['indicator-container'])}>
<div className={styles['indicator']}>
<div>{label} {value}</div>

View file

@ -820,6 +820,7 @@ const Player = ({ urlParams, queryParams }) => {
<Indicator
className={classnames(styles['layer'], styles['indicator-layer'])}
videoState={video.state}
disabled={subtitlesMenuOpen}
/>
{
nextVideoPopupOpen ?