From 56c2f110640981d49d1ded9a4168431b4db4afbe Mon Sep 17 00:00:00 2001 From: Drikus Roor Date: Wed, 13 Dec 2023 15:46:27 +0100 Subject: [PATCH] lint: Fix code formatting --- frontend/src/components/Playback/Playback.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/Playback/Playback.js b/frontend/src/components/Playback/Playback.js index be4dd2d09..f1a856d61 100644 --- a/frontend/src/components/Playback/Playback.js +++ b/frontend/src/components/Playback/Playback.js @@ -76,25 +76,25 @@ const Playback = ({ finishedPlaying(); } }, []); - + // Keep track of last player index useEffect(() => { lastPlayerIndex.current = playerIndex; }, [playerIndex]); - if (playConfig.play_method === 'EXTERNAL') { - webAudio.closeWebAudio(); + if (playConfig.play_method === 'EXTERNAL') { + webAudio.closeWebAudio(); } // Play section with given index const playSection = useCallback( (index = 0) => { - + if (index !== lastPlayerIndex.current) { // Load different audio if (prevPlayerIndex.current !== -1) { pauseAudio(playConfig); - } + } // Store player index setPlayerIndex(index); @@ -115,7 +115,7 @@ const Playback = ({ activeAudioEndedListener.current = webAudio.listenOnce("ended", onAudioEnded); } else { activeAudioEndedListener.current = audio.listenOnce("ended", onAudioEnded); - } + } // Compensate for audio latency and set state to playing setTimeout(startedPlaying && startedPlaying(), latency); @@ -124,7 +124,7 @@ const Playback = ({ // Stop playback if (lastPlayerIndex.current === index) { - pauseAudio(playConfig); + pauseAudio(playConfig); setPlayerIndex(-1); return; } @@ -183,10 +183,10 @@ const Playback = ({ return ( { + onNext={() => { setView(playerType); onPreloadReady(); }} @@ -227,7 +227,7 @@ const Playback = ({ return
Unknown player view {view}
; } }; - + return (
{render(playerType)}
{" "}