diff --git a/package.json b/package.json index e25e90b2..c2eb6ca4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@highlight-run/rrweb", - "version": "1.1.18", + "version": "1.1.19", "description": "record and replay the web", "scripts": { "test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register -r ignore-styles -r jsdom-global/register test/**.test.ts", diff --git a/src/replay/machine.ts b/src/replay/machine.ts index f9188774..4aa18bde 100644 --- a/src/replay/machine.ts +++ b/src/replay/machine.ts @@ -257,7 +257,7 @@ export function createPlayerService( for (const event of newEvents) { addDelay(event, baselineTime); curEvents.push(event); - if (event.timestamp >= baselineTime) { + if (event.timestamp >= timer.timeOffset + baselineTime) { const castFn = getCastFn(event, false); actions.push({ doAction: () => { diff --git a/src/replay/timer.ts b/src/replay/timer.ts index c817be37..087792fc 100644 --- a/src/replay/timer.ts +++ b/src/replay/timer.ts @@ -35,7 +35,7 @@ export class Timer { public replaceActions(actions: actionWithDelay[]) { this.actions.length = 0; - this.actions.splice(0, 0, ...actions) + this.actions.splice(0, 0, ...actions); } public start() {