mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
refactor: add conditional check for opening the indicator
This commit is contained in:
parent
fd5be6985d
commit
03ec592bf3
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