File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed
packages/job-worker/src/playout Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,14 @@ export function getResolvedPiecesForPartInstancesOnTimeline(
4747
4848 const currentPartStarted = partInstancesInfo . current . partStarted ?? now
4949 const nextPartStarted =
50+ partInstancesInfo . current . partInstance . part . autoNext &&
5051 partInstancesInfo . current . partInstance . part . expectedDuration !== undefined
5152 ? currentPartStarted + partInstancesInfo . current . partInstance . part . expectedDuration
5253 : null
5354
5455 // Calculate the next part if needed
5556 let nextResolvedPieces : ResolvedPieceInstance [ ] = [ ]
56- if ( partInstancesInfo . next && partInstancesInfo . current . partInstance . part . autoNext && nextPartStarted != null ) {
57+ if ( partInstancesInfo . next && nextPartStarted != null ) {
5758 const nowInPart = partInstancesInfo . next . nowInPart
5859 nextResolvedPieces = partInstancesInfo . next . pieceInstances . map ( ( instance ) =>
5960 resolvePrunedPieceInstance ( nowInPart , instance )
Original file line number Diff line number Diff line change @@ -61,7 +61,12 @@ export function transformPartIntoTimeline(
6161 }
6262 break
6363 case IBlueprintPieceType . Normal :
64- pieceEnable = getPieceEnableInsidePart ( pieceInstance , partTimings , parentGroup . id )
64+ pieceEnable = getPieceEnableInsidePart (
65+ pieceInstance ,
66+ partTimings ,
67+ parentGroup . id ,
68+ parentGroup . enable . duration !== undefined || parentGroup . enable . end !== undefined
69+ )
6570 break
6671 default :
6772 assertNever ( pieceInstance . piece . pieceType )
Original file line number Diff line number Diff line change @@ -90,7 +90,8 @@ export function transformPieceGroupAndObjects(
9090export function getPieceEnableInsidePart (
9191 pieceInstance : ReadonlyDeep < PieceInstanceWithTimings > ,
9292 partTimings : PartCalculatedTimings ,
93- partGroupId : string
93+ partGroupId : string ,
94+ partHasEndTime : boolean
9495) : TSR . Timeline . TimelineEnable {
9596 const pieceEnable : TSR . Timeline . TimelineEnable = { ...pieceInstance . piece . enable }
9697 if ( typeof pieceEnable . start === 'number' ) {
@@ -103,7 +104,8 @@ export function getPieceEnableInsidePart(
103104 }
104105 }
105106
106- if ( partTimings . toPartPostroll ) {
107+ // If the part has an end time, we can consider post-roll
108+ if ( partHasEndTime && partTimings . toPartPostroll ) {
107109 if ( ! pieceEnable . duration ) {
108110 // make sure that the control object is shortened correctly
109111 pieceEnable . duration = `#${ partGroupId } - ${ partTimings . toPartPostroll } `
Original file line number Diff line number Diff line change @@ -266,7 +266,9 @@ function generateCurrentInfinitePieceObjects(
266266 const pieceEnable = getPieceEnableInsidePart (
267267 pieceInstance ,
268268 currentPartInstanceTimings ,
269- timingContext . currentPartGroup . id
269+ timingContext . currentPartGroup . id ,
270+ timingContext . currentPartGroup . enable . end !== undefined ||
271+ timingContext . currentPartGroup . enable . duration !== undefined
270272 )
271273
272274 let nowInParent = currentPartInfo . nowInPart // Where is 'now' inside of the infiniteGroup?
You can’t perform that action at this time.
0 commit comments