|
@ -150,6 +150,23 @@ const PlayerBar = () => { |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const handleVolumeWheel = (e: any) => { |
|
|
|
|
|
if (e.deltaY > 0) { |
|
|
|
|
|
if (!isDraggingVolume) { |
|
|
|
|
|
setIsDraggingVolume(true); |
|
|
|
|
|
} |
|
|
|
|
|
let vol = Number((playQueue.volume - 0.01).toFixed(2)); |
|
|
|
|
|
vol = vol < 0 ? 0 : vol; |
|
|
|
|
|
setLocalVolume(vol); |
|
|
|
|
|
dispatch(setVolume(vol)); |
|
|
|
|
|
} else { |
|
|
|
|
|
let vol = Number((playQueue.volume + 0.01).toFixed(2)); |
|
|
|
|
|
vol = vol > 1 ? 1 : vol; |
|
|
|
|
|
setLocalVolume(vol); |
|
|
|
|
|
dispatch(setVolume(vol)); |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const handleClickForward = () => { |
|
|
const handleClickForward = () => { |
|
|
if (playQueue[currentEntryList].length > 0) { |
|
|
if (playQueue[currentEntryList].length > 0) { |
|
|
const seekForwardInterval = Number(settings.getSync('seekForwardInterval')); |
|
|
const seekForwardInterval = Number(settings.getSync('seekForwardInterval')); |
|
@ -691,8 +708,18 @@ const PlayerBar = () => { |
|
|
} |
|
|
} |
|
|
onClick={() => setMuted(!muted)} |
|
|
onClick={() => setMuted(!muted)} |
|
|
size="lg" |
|
|
size="lg" |
|
|
style={{ cursor: 'pointer', marginRight: '15px', padding: '0' }} |
|
|
|
|
|
/> |
|
|
/> |
|
|
|
|
|
<Whisper |
|
|
|
|
|
trigger="hover" |
|
|
|
|
|
placement="top" |
|
|
|
|
|
delay={200} |
|
|
|
|
|
preventOverflow |
|
|
|
|
|
speaker={ |
|
|
|
|
|
<StyledPopover> |
|
|
|
|
|
{muted ? 'Muted' : Math.floor(localVolume * 100)} |
|
|
|
|
|
</StyledPopover> |
|
|
|
|
|
} |
|
|
|
|
|
> |
|
|
<CustomSlider |
|
|
<CustomSlider |
|
|
tabIndex={0} |
|
|
tabIndex={0} |
|
|
progress |
|
|
progress |
|
@ -702,7 +729,9 @@ const PlayerBar = () => { |
|
|
style={{ width: '100px', marginRight: '10px' }} |
|
|
style={{ width: '100px', marginRight: '10px' }} |
|
|
onChange={handleVolumeSlider} |
|
|
onChange={handleVolumeSlider} |
|
|
onKeyDown={handleVolumeKey} |
|
|
onKeyDown={handleVolumeKey} |
|
|
|
|
|
onWheel={handleVolumeWheel} |
|
|
/> |
|
|
/> |
|
|
|
|
|
</Whisper> |
|
|
</Row> |
|
|
</Row> |
|
|
</Grid> |
|
|
</Grid> |
|
|
</PlayerColumn> |
|
|
</PlayerColumn> |
|
|