fix(lab): restore canonical spatial replay
This commit is contained in:
@@ -18,6 +18,7 @@ let nextM48ObjectId;
|
||||
let laboratoryMetricLegendEntries;
|
||||
let nearestLaboratoryRecordedClipFrame;
|
||||
let laboratoryRecordedClipEndExclusiveNs;
|
||||
let laboratoryRecordedClipClockGate;
|
||||
let m48SpatialPlaybackWindow;
|
||||
let trimM48SpatialPlaybackCache;
|
||||
let nextM48CameraVisibility;
|
||||
@@ -45,6 +46,7 @@ before(async () => {
|
||||
({
|
||||
nearestLaboratoryRecordedClipFrame,
|
||||
laboratoryRecordedClipEndExclusiveNs,
|
||||
laboratoryRecordedClipClockGate,
|
||||
} = await server.ssrLoadModule(
|
||||
"/src/components/laboratory/LaboratoryRecordedClipPlayer.tsx",
|
||||
));
|
||||
@@ -342,6 +344,21 @@ test("shared recorded clip clock selects exact frames and one stable loop bounda
|
||||
assert.equal(laboratoryRecordedClipEndExclusiveNs(frames), 1_300_000_000);
|
||||
});
|
||||
|
||||
test("shared recorded clip rejects stale media callbacks until an explicit seek lands", () => {
|
||||
assert.deepEqual(laboratoryRecordedClipClockGate(1, 123), {
|
||||
accept: false,
|
||||
pendingSequence: 1,
|
||||
});
|
||||
assert.deepEqual(laboratoryRecordedClipClockGate(1, 1), {
|
||||
accept: true,
|
||||
pendingSequence: null,
|
||||
});
|
||||
assert.deepEqual(laboratoryRecordedClipClockGate(null, 124), {
|
||||
accept: true,
|
||||
pendingSequence: null,
|
||||
});
|
||||
});
|
||||
|
||||
test("M4.8 camera and spatial visibility are independent without an empty viewer", () => {
|
||||
assert.equal(nextM48CameraVisibility("camera", true), true);
|
||||
assert.equal(nextM48CameraVisibility("3d", true), false);
|
||||
|
||||
Reference in New Issue
Block a user