From 71cd7fb7636d42fb91fed8492cd92638f5e72125 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Fri, 17 Apr 2020 18:41:25 +0100 Subject: [PATCH] Update remaining counter on seeking. --- src/mixer/state.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mixer/state.ts b/src/mixer/state.ts index ef690f7..d68157f 100644 --- a/src/mixer/state.ts +++ b/src/mixer/state.ts @@ -406,6 +406,14 @@ export const load = ( }) ); }); + wavesurfer.on("seek", () => { + dispatch( + mixerState.actions.setTimeCurrent({ + player, + time: wavesurfer.getCurrentTime() + }) + ); + }) wavesurfer.on("finish", () => { dispatch(mixerState.actions.setPlayerState({ player, state: "stopped" })); const state = getState().mixer.players[player];