mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
chromecastServiceActive flag renamed
This commit is contained in:
parent
2bbf3934c9
commit
c49d4baef5
1 changed files with 3 additions and 3 deletions
|
|
@ -30,7 +30,7 @@ const ControlBar = ({
|
|||
...props
|
||||
}) => {
|
||||
const { chromecast } = useServices();
|
||||
const [chromecastActive, setChromecastActive] = React.useState(() => chromecast.active);
|
||||
const [chromecastServiceActive, setChromecastServiceActive] = React.useState(() => chromecast.active);
|
||||
const onSubtitlesButtonMouseDown = React.useCallback((event) => {
|
||||
event.nativeEvent.subtitlesMenuClosePrevented = true;
|
||||
}, []);
|
||||
|
|
@ -74,7 +74,7 @@ const ControlBar = ({
|
|||
}, []);
|
||||
React.useEffect(() => {
|
||||
const onStateChanged = () => {
|
||||
setChromecastActive(chromecast.active);
|
||||
setChromecastServiceActive(chromecast.active);
|
||||
};
|
||||
chromecast.on('stateChanged', onStateChanged);
|
||||
return () => {
|
||||
|
|
@ -117,7 +117,7 @@ const ControlBar = ({
|
|||
<Button className={classnames(styles['control-bar-button'], { 'disabled': typeof info !== 'object' || info === null })} tabIndex={-1} onMouseDown={onInfoButtonMouseDown} onClick={onInfoButtonClick}>
|
||||
<Icon className={styles['icon']} icon={'ic_info'} />
|
||||
</Button>
|
||||
<Button className={classnames(styles['control-bar-button'], { 'disabled': !chromecastActive })} tabIndex={-1} onClick={onChromecastButtonClick}>
|
||||
<Button className={classnames(styles['control-bar-button'], { 'disabled': !chromecastServiceActive })} tabIndex={-1} onClick={onChromecastButtonClick}>
|
||||
<Icon className={styles['icon']} icon={'ic_cast'} />
|
||||
</Button>
|
||||
<Button className={classnames(styles['control-bar-button'], { 'disabled': !Array.isArray(subtitlesTracks) || subtitlesTracks.length === 0 })} tabIndex={-1} onMouseDown={onSubtitlesButtonMouseDown} onClick={onSubtitlesButtonClick}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue