Don't perform newly added actions if player is paused (#539)

This commit is contained in:
Eoghan Murray
2021-04-18 07:15:57 +01:00
committed by GitHub
parent fbfb96297d
commit 7c5e15d607

View File

@@ -242,7 +242,7 @@ export function createPlayerService(
const castFn = getCastFn(event, isSync); const castFn = getCastFn(event, isSync);
if (isSync) { if (isSync) {
castFn(); castFn();
} else { } else if (timer.isActive()) {
timer.addAction({ timer.addAction({
doAction: () => { doAction: () => {
castFn(); castFn();
@@ -250,9 +250,6 @@ export function createPlayerService(
}, },
delay: event.delay!, delay: event.delay!,
}); });
if (!timer.isActive()) {
timer.start();
}
} }
} }
return { ...ctx, events }; return { ...ctx, events };