From f2ed0e7d5ee43a9a651261838d0559320e62a528 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Fri, 11 Feb 2022 14:07:09 -0800 Subject: [PATCH] Reset player volume when resetting song (#228) --- src/hooks/usePlayerControls.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hooks/usePlayerControls.ts b/src/hooks/usePlayerControls.ts index 080cb55..00cc4c4 100644 --- a/src/hooks/usePlayerControls.ts +++ b/src/hooks/usePlayerControls.ts @@ -63,6 +63,7 @@ const usePlayerControls = ( dispatch(fixPlayer2Index()); } else if (currentPlayer === 1) { playersRef.current.player1.audioEl.current.currentTime = 0; + playersRef.current.player1.audioEl.current.volume = playQueue.volume; // Reset the alt player if reset during fade playersRef.current.player2.audioEl.current.currentTime = 0; @@ -83,6 +84,7 @@ const usePlayerControls = ( } } else { playersRef.current.player2.audioEl.current.currentTime = 0; + playersRef.current.player2.audioEl.current.volume = playQueue.volume; // Reset the alt player if reset during fade playersRef.current.player1.audioEl.current.currentTime = 0;