From 3febdb73986344f50496d541a898ae2ad04ef9a9 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Fri, 17 Apr 2020 18:41:08 +0100 Subject: [PATCH] Fix #62, stop doesn't stop from paused state. --- src/mixer/state.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mixer/state.ts b/src/mixer/state.ts index 768ba77..ef690f7 100644 --- a/src/mixer/state.ts +++ b/src/mixer/state.ts @@ -560,6 +560,8 @@ export const stop = (player: number): AppThunk => (dispatch, getState) => { return; } wavesurfers[player].stop(); + // Incase wavesurver wasn't playing, it won't 'finish', so just make sure the UI is stopped. + dispatch(mixerState.actions.setPlayerState({ player, state: "stopped" })); if (state.tracklistItemID !== -1) { dispatch(BroadcastState.tracklistEnd(state.tracklistItemID));