Scenes: a clip restarted without a media gate plays its hold out

A resumed hold waited only its rest unless the layer gave a media gate,
and only trimmed clips have one, so an untrimmed clip started again (as
on Gyirong) was cut short. The layer now says when a run going on from a
seek started its clip again, and the hold then plays out as from its
start: through the media gate when there is one, else for the whole hold.
This commit is contained in:
Sameh Khamis committed 2026-11-16 14:20:55 -08:00
1 parent 5cce9d0705
commit 186f8b76d9
5 files changed
+106 -8

No files matched your search

+3 -1
View File
@@ -2140,6 +2140,7 @@ test('a hold resumed partway waits for a clip that starts again, else only its r
let reads = 0;
const module = {
getSceneShotMediaHold: () => ({ pending: reads++ < pendingReads, maxWaitMs: 20000 }),
sceneShotRestartsMedia: () => pendingReads > 0,
};
const waits = [];
await SceneDirector.prototype._holdShot.call(
@@ -2158,7 +2159,8 @@ test('a hold resumed partway waits for a clip that starts again, else only its r
return waits;
};
// The clip plays again: the hold polls until it is done, as any hold does.
assert.deepEqual(await hold(4), [70, 70]);
const polls = await hold(4);
assert.ok(polls.length && polls.every((ms) => ms === 70), String(polls));
// The moment was past the clip: only the rest of the hold.
assert.deepEqual(await hold(0), [2000]);
});