Static Member Summary
Static Public Members | ||
public static | instance: * | |
public static | storageKey: * |
Constructor Summary
Public Constructor | ||
public |
Member Summary
Method Summary
Public Methods | ||
public | clear() Clears the storage. | |
public | getCurrentEventIndex(): * | number Gets the current event index. | |
public | Get event Item by Index. | |
public | getReplaySpeed(): * | |
public | Gets number of total evnets | |
public | Increment current event index. | |
public | load(events: *) Load events into storage. | |
public | playNextEvent(): Promise<Object>|Promise<undefined> Returns a promise which executes an event. | |
public | Ready state check, checks wheter the document is ready. | |
public | Replay events. | |
public | setReplaySpeed(divider: *) Sets the replay speed | |
public | stop() Stop replay execution. | |
public | updateReplayStorage(object: Object) update replay storage |
Public Constructors
public constructor() source
Public Members
public instance: * source
Public Methods
public clear() source
Clears the storage.
public getItem(index: *): Object source
Get event Item by Index.
Params:
Name | Type | Attribute | Description |
index | * |
Return:
Object |
public getReplaySpeed(): * source
Return:
* |
public incrementCurrentEventIndedx() source
Increment current event index.
public load(events: *) source
Load events into storage. adds a currentEventIndex which will be used to keep track on which event we are currently playing.
Params:
Name | Type | Attribute | Description |
events | * |
public playNextEvent(): Promise<Object>|Promise<undefined> source
Returns a promise which executes an event. Checks for cancellation which occurs when this.stop() has been called. Finds the event to be executed in replay storage. Increment the current event index. Finds the correct class based on event type in Registry. Execute the replay function on the event class and wait for it to resolve.
Return:
Promise<Object>|Promise<undefined> | returns a Promise which rejects to an error and resolves to undefined. |
public readyStateCheck(): Promise source
Ready state check, checks wheter the document is ready. resolves when the document is ready.
Return:
Promise | resolves when document is ready. |
public setReplaySpeed(divider: *) source
Sets the replay speed
Params:
Name | Type | Attribute | Description |
divider | * | higher is faster, lower is slower. |
public stop() source
Stop replay execution.