Changed stream volume slider to disable instead of hide when unavailable

This commit is contained in:
Mitchell McCaffrey 2020-08-05 17:46:42 +10:00
parent c6c9acae3d
commit 48f39380ab
2 changed files with 13 additions and 9 deletions

View File

@ -102,15 +102,14 @@ function Stream({ stream, nickname }) {
> >
<StreamMuteIcon muted={streamMuted} /> <StreamMuteIcon muted={streamMuted} />
</IconButton> </IconButton>
{isVolumeControlAvailable && ( <Slider
<Slider value={streamVolume}
value={streamVolume} min={0}
min={0} max={2}
max={2} step={0.1}
step={0.1} onChange={handleVolumeChange}
onChange={handleVolumeChange} disabled={!isVolumeControlAvailable}
/> />
)}
{stream && <audio ref={audioRef} playsInline muted={streamMuted} />} {stream && <audio ref={audioRef} playsInline muted={streamMuted} />}
</Flex> </Flex>
<Banner <Banner

View File

@ -179,6 +179,11 @@ export default {
borderColor: "text", borderColor: "text",
}, },
}, },
slider: {
"&:disabled": {
opacity: 0.5,
},
},
}, },
buttons: { buttons: {
primary: { primary: {