Fix #62, stop doesn't stop from paused state.

This commit is contained in:
Matthew Stratford 2020-04-17 18:41:08 +01:00
parent 800e36d587
commit 3febdb7398

View file

@ -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));