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} />
</IconButton>
{isVolumeControlAvailable && (
<Slider
value={streamVolume}
min={0}
max={2}
step={0.1}
onChange={handleVolumeChange}
/>
)}
<Slider
value={streamVolume}
min={0}
max={2}
step={0.1}
onChange={handleVolumeChange}
disabled={!isVolumeControlAvailable}
/>
{stream && <audio ref={audioRef} playsInline muted={streamMuted} />}
</Flex>
<Banner

View File

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