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.
Feel free to join #development
on our Discord.
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}`)
});