Skip to content

wfk007/rrweb-events-merge

Repository files navigation

rrweb-events-merge

You can choose any time range in replay and generate a new clip of the rrweb events which can be played independently EVEN IF there are no fullsnapshots in this time range.

Extremely small lib size:

  • size: 1.59 KB
  • gzip: 0.73 KB

Usage

  1. install dependencies
npm install rrweb-events-merge
  1. import and generate merged events
import { mergeEvents } from "rrweb-events-merge";

const mergedEvents = mergeEvents({
  events: events,
  startTimeStamp: startTimeStamp,
  endTimeStamp: endTimeStamp,
  iframe: iframe,
  snapshotOptions: {
    mirror,
  },
  onError: (error: string) => {
    console.error(error);
  },
});

you can also see the example in the MergeEvents.vue

examples

  1. install all dependencies
pnpm install
  1. build sdk
cd packages/sdk && pnpm run build
  1. start the platform dev server
cd packages/platform && pnpm run dev
  1. open http://localhost:5173/

  2. In step1: you need to record the page and generate the row events

    • click the button: startRecord
    • click and select the form
    • click the button: stopRecord
  3. In step2: you need to choose the time range and generate the merged events

    • select the start timestamp which is the start event you want to start with
    • click the button: Merge Events and generate the merged events
  4. In step3: you can watch the video created by the merged events

About

merge rrweb events

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published