Browse Source

Replace volume slider with new component

master
jeffvli 3 years ago
committed by Jeff
parent
commit
ca7629d748
  1. 18
      src/components/player/PlayerBar.tsx

18
src/components/player/PlayerBar.tsx

@ -12,7 +12,6 @@ import {
PlayerContainer, PlayerContainer,
PlayerColumn, PlayerColumn,
PlayerControlIcon, PlayerControlIcon,
CustomSlider,
DurationSpan, DurationSpan,
VolumeIcon, VolumeIcon,
LinkButton, LinkButton,
@ -239,7 +238,6 @@ const PlayerBar = () => {
handleSeekBackward, handleSeekBackward,
handleSeekForward, handleSeekForward,
handleSeekSlider, handleSeekSlider,
handleVolumeKey,
handleVolumeSlider, handleVolumeSlider,
handleVolumeWheel, handleVolumeWheel,
handleRepeat, handleRepeat,
@ -797,10 +795,14 @@ const PlayerBar = () => {
<div <div
style={{ style={{
height: '25px', height: '25px',
width: '100%',
maxWidth: '115px',
marginRight: '10px',
display: 'flex', display: 'flex',
alignSelf: 'flex-end', alignSelf: 'flex-end',
alignItems: 'center', alignItems: 'center',
}} }}
onWheel={handleVolumeWheel}
> >
{/* Volume Slider */} {/* Volume Slider */}
<VolumeIcon <VolumeIcon
@ -815,16 +817,12 @@ const PlayerBar = () => {
preventOverflow preventOverflow
speaker={<Popup>{muted ? t('Muted') : Math.floor(localVolume * 100)}</Popup>} speaker={<Popup>{muted ? t('Muted') : Math.floor(localVolume * 100)}</Popup>}
> >
<CustomSlider <Slider
tabIndex={0}
progress
value={Math.floor(localVolume * 100)} value={Math.floor(localVolume * 100)}
$isDragging={isDraggingVolume} min={0}
tooltip={false} max={100}
style={{ width: '87px', marginRight: '10px' }}
onChange={handleVolumeSlider} onChange={handleVolumeSlider}
onKeyDown={handleVolumeKey} toolTipType="text"
onWheel={handleVolumeWheel}
/> />
</Whisper> </Whisper>
</div> </div>

Loading…
Cancel
Save