fix #535 add play-back event to reset mirror and replayer

This commit is contained in:
Yanzhen Yu
2021-04-18 21:31:29 +08:00
parent cf860278a2
commit df455c483a
4 changed files with 22 additions and 9 deletions

View File

@@ -193,6 +193,10 @@ export class Replayer {
this.applyInput(d);
}
});
this.emitter.on(ReplayerEvents.PlayBack, () => {
this.firstPlayedEvent = null;
mirror.reset();
});
const timer = new Timer([], config?.speed || defaultConfig.speed);
this.service = createPlayerService(