Don't assume files only move forward in time (fixes #26)

This commit is contained in:
Marks Polakovs 2020-03-28 08:41:32 +01:00
parent f39a9d2232
commit 0e40f26438

View file

@ -359,9 +359,10 @@ export const load = (
}); });
wavesurfer.on("audioprocess", () => { wavesurfer.on("audioprocess", () => {
if ( if (
Math.abs(
wavesurfer.getCurrentTime() - wavesurfer.getCurrentTime() -
getState().mixer.players[player].timeCurrent > getState().mixer.players[player].timeCurrent
0.5 ) > 0.5
) { ) {
dispatch( dispatch(
mixerState.actions.setTimeCurrent({ mixerState.actions.setTimeCurrent({