Skip to content

Commit 21674b1

Browse files
committed
fix: skip untimed parts in T-timer projection calculations
1 parent b6ab278 commit 21674b1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/job-worker/src/playout/tTimers.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ export function recalculateTTimerProjections(context: JobContext, playoutModel:
238238
let currentSegmentId: SegmentId | undefined = undefined
239239

240240
// Handle current part/segment
241-
if (currentPartInstance) {
241+
// TODO: We should consider how to handle the case where the current part is untimed - for now, we just skip it in the calculations
242+
if (currentPartInstance && !currentPartInstance.part.untimed) {
242243
currentSegmentId = currentPartInstance.segmentId
243244
const currentSegment = playoutModel.findSegment(currentPartInstance.segmentId)
244245
const currentSegmentBudget = currentSegment?.segment.segmentTiming?.budgetDuration
@@ -332,9 +333,11 @@ export function recalculateTTimerProjections(context: JobContext, playoutModel:
332333
timerAnchors.delete(part._id)
333334
}
334335

335-
// Accumulate this part's duration
336-
const partDuration = part.expectedDurationWithTransition ?? part.expectedDuration ?? 0
337-
segmentAccumulator += partDuration
336+
// Accumulate this part's duration (skip untimed parts)
337+
if (!part.untimed) {
338+
const partDuration = part.expectedDurationWithTransition ?? part.expectedDuration ?? 0
339+
segmentAccumulator += partDuration
340+
}
338341
}
339342

340343
// Clear projections for unresolved anchors

0 commit comments

Comments
 (0)