close #153 emit event when it being casted
This commit is contained in:
@@ -131,7 +131,13 @@ export class Replayer {
|
|||||||
if (isSync) {
|
if (isSync) {
|
||||||
castFn();
|
castFn();
|
||||||
} else {
|
} else {
|
||||||
actions.push({ doAction: castFn, delay: this.getDelay(event) });
|
actions.push({
|
||||||
|
doAction: () => {
|
||||||
|
castFn();
|
||||||
|
this.emitter.emit(ReplayerEvents.EventCast, event);
|
||||||
|
},
|
||||||
|
delay: this.getDelay(event),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.timer.addActions(actions);
|
this.timer.addActions(actions);
|
||||||
|
|||||||
@@ -313,4 +313,5 @@ export enum ReplayerEvents {
|
|||||||
SkipStart = 'skip-start',
|
SkipStart = 'skip-start',
|
||||||
SkipEnd = 'skip-end',
|
SkipEnd = 'skip-end',
|
||||||
MouseInteraction = 'mouse-interaction',
|
MouseInteraction = 'mouse-interaction',
|
||||||
|
EventCast = 'event-cast',
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user