Set duration of track first, so remainder is calculated.
This commit is contained in:
parent
e671dfcf17
commit
158811b658
1 changed files with 6 additions and 6 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue