Skip to content

Commit

Permalink
Fix volume isn't remembered after reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed Nov 6, 2024
1 parent 2866a68 commit bc24a4a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/contexts/PlayStateContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ export const PlayStateProvider = ({children}) => {
}
//console.log(playerTime + performance.now() - performanceNowRef.current);
return playerTime + performance.now() - performanceNowRef.current;
}, [playing]);
}, [playing]);

useEffect(() => {
playerRef.current.volume = volume;
}, []);

return (
<PlayStateContext.Provider value={{
Expand Down

0 comments on commit bc24a4a

Please sign in to comment.