Don't perform newly added actions if player is paused (#539)
This commit is contained in:
@@ -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 };
|
||||||
|
|||||||
Reference in New Issue
Block a user