mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
refactor: add a conditional to the indicator
This commit is contained in:
parent
fd5be6985d
commit
4ce1ee7a6a
1 changed files with 4 additions and 2 deletions
|
|
@ -157,11 +157,13 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
|
||||
const onVolumeChangeRequested = React.useCallback((volume) => {
|
||||
video.setProp('volume', volume);
|
||||
openVolumeChangeIndicator();
|
||||
if (immersed && !menusOpen) {
|
||||
openVolumeChangeIndicator();
|
||||
}
|
||||
|
||||
if (volumeChangeTimeout.current) clearTimeout(volumeChangeTimeout.current);
|
||||
volumeChangeTimeout.current = setTimeout(closeVolumeChangeIndicator, 1500);
|
||||
}, [openVolumeChangeIndicator, closeVolumeChangeIndicator]);
|
||||
}, [immersed, menusOpen]);
|
||||
|
||||
const onSeekRequested = React.useCallback((time) => {
|
||||
video.setProp('time', time);
|
||||
|
|
|
|||
Loading…
Reference in a new issue