fix(recorder): bug fix, oopif load too late

This commit is contained in:
Ljy-0827 authored and GitHub committed 2026-08-23 21:26:41 +08:00
1 parent e9deb6cb1c
commit 30bae04493
5 files changed
+319 -21

No files matched your search

+10 -1
View File
@@ -888,7 +888,16 @@ export async function handleRecordStart(
actionQueue: Promise.resolve(),
lastStepSequenceByProducer: new Map(),
});
deps.frameCoordinator?.begin(requestId, startedAtMs);
deps.frameCoordinator?.begin(requestId, startedAtMs, target.tabId, async (scope) => {
const recording = recordings.get(params.session_id);
if (!recording || recording.requestId !== requestId || recording.settled) return;
try {
await recording.observation?.refreshDocument(scope.tabId, scope.producerId);
} catch {
// The normal action-time capture remains available if a child Document
// is replaced while its readiness refresh is in flight.
}
});
// Observe navigations for the whole recording lifetime; attach before
// optional navigate so the destination load can rearm capture.
ensureBrowserObservationListeners(deps);