mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
Fix initial volume
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user