make sure emit EventCast after cast fn

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 80479d9b9e
commit 49b7d02e73
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!,
});