export timer to public API
This commit is contained in:
@@ -40,6 +40,8 @@ const defaultConfig: playerConfig = {
|
||||
export class Replayer {
|
||||
public wrapper: HTMLDivElement;
|
||||
|
||||
public timer: Timer;
|
||||
|
||||
private events: eventWithTime[] = [];
|
||||
private config: playerConfig = defaultConfig;
|
||||
|
||||
@@ -55,8 +57,6 @@ export class Replayer {
|
||||
private nextUserInteractionEvent: eventWithTime | null;
|
||||
private noramlSpeed: number;
|
||||
|
||||
private timer: Timer;
|
||||
|
||||
private missingNodeRetryMap: missingNodeMap = {};
|
||||
|
||||
constructor(events: eventWithTime[], config?: Partial<playerConfig>) {
|
||||
@@ -90,6 +90,10 @@ export class Replayer {
|
||||
};
|
||||
}
|
||||
|
||||
public getTimeOffset(): number {
|
||||
return this.baselineTime - this.events[0].timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* This API was designed to be used as play at any time offset.
|
||||
* Since we minimized the data collected from recorder, we do not
|
||||
|
||||
Reference in New Issue
Block a user