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

+24
View File
@@ -1090,6 +1090,8 @@ export function createBhoteKoshiEventLayer({
let _sceneRevealProgress = 1;
// How far a timeline seek's settled-camera reveal had come (0..1, linear).
let _sceneSeekRevealLinear = 1;
// The beat whose clip a run going on from a seek in its hold started again.
let _sceneMediaRestartBeatId = null;
let _cinematicKeyframes = [];
let _cinematicActive = false;
let _cinematicReplayArmed = false;
@@ -1552,6 +1554,19 @@ export function createBhoteKoshiEventLayer({
);
}
/**
* Whether a run going on from a seek in this beat's hold started its clip
* again, so the hold has to play out as from its start.
*/
function sceneShotRestartsMedia(beatId) {
return (
_enabled &&
_sceneBeatId === beatId &&
_sceneMediaRestartBeatId === beatId &&
sceneEvidenceMediaAutoplays()
);
}
function getSceneShotMediaHold(beatId) {
if (
!_enabled ||
@@ -3896,6 +3911,14 @@ export function createBhoteKoshiEventLayer({
nowDeferred;
if (resumesSeek && sceneSeekPassedMedia(previousSeek))
_sceneMediaPlaybackCompletedBeatId = _sceneBeatId;
if (
resumesSeek &&
sceneEvidenceMediaAutoplays() &&
!sceneSeekPassedMedia(previousSeek)
)
_sceneMediaRestartBeatId = _sceneBeatId;
else if (beatChanged || sceneTimelineSeek())
_sceneMediaRestartBeatId = null;
if (!nowDeferred) {
stopSceneEvidenceReveal();
_sceneRevealProgress = 1;
@@ -4010,6 +4033,7 @@ export function createBhoteKoshiEventLayer({
setParams,
getParams,
getSceneShotMediaHold,
sceneShotRestartsMedia,
setSceneMediaPlayback,
getStats() {
return {