Fix initial volume

This commit is contained in:
jeffvli
2022-08-02 10:47:12 -07:00
parent d11051bbc1
commit 3d677188b5
@@ -10,14 +10,12 @@ export const useRightControls = () => {
// Ensure that the mpv player volume is set on startup
useEffect(() => {
mpvPlayer.volume(volume);
}, [volume]);
// Ensure that the mpv player mute status is set on startup
useEffect(() => {
if (muted) {
mpvPlayer.mute();
}
}, [muted]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const handleVolumeSlider = (e: number) => {
mpvPlayer.volume(e);