make sure emit EventCast after cast fn

This commit is contained in:
Yanzhen Yu
2022-01-18 23:54:28 +08:00
parent fb8ea8e657
commit c788ba66e1
2 changed files with 2 additions and 2 deletions

View File

@@ -627,6 +627,8 @@ export class Replayer {
finish();
}
}
this.emitter.emit(ReplayerEvents.EventCast, event);
};
return wrappedCastFn;
}

View File

@@ -204,7 +204,6 @@ export function createPlayerService(
actions.push({
doAction: () => {
castFn();
emitter.emit(ReplayerEvents.EventCast, event);
},
delay: event.delay!,
});
@@ -269,7 +268,6 @@ export function createPlayerService(
timer.addAction({
doAction: () => {
castFn();
emitter.emit(ReplayerEvents.EventCast, event);
},
delay: event.delay!,
});