Set duration of track first, so remainder is calculated.

This commit is contained in:
Matthew Stratford 2020-04-06 14:46:37 +01:00
parent e671dfcf17
commit 158811b658

View file

@ -351,18 +351,18 @@ export const load = (
wavesurfer.on("ready", () => {
dispatch(mixerState.actions.itemLoadComplete({ player }));
dispatch(
mixerState.actions.setTimeCurrent({
player,
time: 0
})
);
dispatch(
mixerState.actions.setTimeLength({
player,
time: wavesurfer.getDuration()
})
);
dispatch(
mixerState.actions.setTimeCurrent({
player,
time: 0
})
);
const state = getState().mixer.players[player];
if (state.playOnLoad) {
wavesurfer.play();