Documentation

Overview

One of our goals from the start has been to make it easy for others to use recordings in new ways. Recordings can be inspected in a million ways, but here are a couple use cases.

  1. A node script that analyzes many recordings for unexecuted code
  2. A web app that suggests new static types
  3. An animation performance tool that helps users debug janky frames

Feel free to join #development  on our Discord.

Protocol

The Replay Protocol defines the API for uploading and inspecting recordings. It is designed to be flexible so that it is easy to get started and powerful enough to scale to advanced use cases.

We build our devtools with it so it is safe to assume that anything that you can do in the viewer, you can implement as well.

Here's an example that prints the scripts discovered in a recording

const { sessionId } = await sendMessage("Recording.createSession", { recordingId });
await sendMessage("Debugger.findScripts", {}, sessionId);

addEventListener("Debugger.scriptParsed", ({ url }) => {
  console.log(`New source ${url}`)
});