fix(Player): hide indicator if subtitles menu is open

This commit is contained in:
Tim 2025-07-03 11:22:14 +02:00
parent c2a2eca4e9
commit 4632d6e09a
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 ?