Ignore firstFullSnapshot once only after initial 'poster' build (#608)

* Encountered a bug where firstFullSnapshot was played twice because timer was immediately started and reached the snapshot before the setTimeout returned

* Ignoring a FullSnapshot needs to be a one-time only thing, as otherwise we'll ignore it after scrubbing (restarting play head at a particular time). This is a problem if mutations have altered the player state, and we try to replay those mutations, so we e.g. try to remove an element that has already been removed because we haven't reset the FullSnapshot state

* Some `npm run typings` related fixups
This commit is contained in:
Eoghan Murray
2021-07-06 04:55:52 +01:00
committed by GitHub
parent 55f7f4f5d2
commit f99b00eb9d
2 changed files with 16 additions and 9 deletions

View File

@@ -20,7 +20,7 @@ export declare class Replayer {
private elementStateMap;
private imageMap;
private mirror;
private firstPlayedEvent;
private firstFullSnapshot;
private newDocumentQueue;
constructor(events: Array<eventWithTime | string>, config?: Partial<playerConfig>);
on(event: string, handler: Handler): this;