implemented the play any offset feature

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent eb56afa59f
commit cd0889e9c5
4 changed files with 68 additions and 36 deletions

View File

@@ -1,4 +1,4 @@
import { idNodeMap, NodeType, serializeNodeWithId } from 'rrweb-snapshot';
import { idNodeMap, NodeType, serializeNodeWithId, resetId } from 'rrweb-snapshot';
import {
Mirror,
throttleOptions,
@@ -32,6 +32,7 @@ export const mirror: Mirror = {
// TODO: transform this into the snapshot repo
export function getIdNodeMap(doc: Document) {
resetId();
const map: idNodeMap = {};
function walk(n: Node) {