Update remaining counter on seeking.

This commit is contained in:
Matthew Stratford 2020-04-17 18:41:25 +01:00
parent 3febdb7398
commit 71cd7fb763

View file

@ -406,6 +406,14 @@ export const load = (
}) })
); );
}); });
wavesurfer.on("seek", () => {
dispatch(
mixerState.actions.setTimeCurrent({
player,
time: wavesurfer.getCurrentTime()
})
);
})
wavesurfer.on("finish", () => { wavesurfer.on("finish", () => {
dispatch(mixerState.actions.setPlayerState({ player, state: "stopped" })); dispatch(mixerState.actions.setPlayerState({ player, state: "stopped" }));
const state = getState().mixer.players[player]; const state = getState().mixer.players[player];