Skip to content

Commit

Permalink
Merge pull request #218 from tv2/SOF-1539/buildTimeline
Browse files Browse the repository at this point in the history
SOF-1539 No longer uses 'while x' for server Parts and Pieces.
  • Loading branch information
LindvedKrvang authored Sep 21, 2023
2 parents bf9be84 + 5fccb97 commit a9171b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
12 changes: 2 additions & 10 deletions src/tv2-common/content/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ function GetServerTimeline(
partProps: ServerPartProps,
contentProps: ServerContentProps
): TimelineObjectCoreExt[] {
const serverEnableClass = `.${GetEnableClassForServer(contentProps.mediaPlayerSession)}`

const mediaObj: TSR.TimelineObjCCGMedia & TimelineBlueprintExt = {
id: '',
enable: {
while: serverEnableClass
start: 0
},
priority: 1,
layer: sourceLayers.Caspar.ClipPending,
Expand All @@ -92,17 +90,11 @@ function GetServerTimeline(
}
}

const mediaOffObj = JSON.parse(JSON.stringify(mediaObj)) as TSR.TimelineObjCCGMedia & TimelineBlueprintExt
mediaOffObj.enable = { while: `!${serverEnableClass}` }
mediaOffObj.content.playing = false
mediaOffObj.content.noStarttime = true

const audioEnable = {
while: serverEnableClass
start: 0
}
return [
mediaObj,
mediaOffObj,
...GetSisyfosTimelineObjForServer(
context.config,
partProps.voLevels,
Expand Down
2 changes: 1 addition & 1 deletion src/tv2-common/parts/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function getServerSelectionBlueprintPiece(
enable: { start: 0 },
outputLayerId: SharedOutputLayer.SEC,
sourceLayerId: layers.SourceLayer.SelectedServer,
lifespan: PieceLifespan.OutOnSegmentEnd,
lifespan: PieceLifespan.WithinPart,
metaData: {
mediaPlayerSessions: [contentProps.mediaPlayerSession],
userData: userDataElement,
Expand Down
2 changes: 1 addition & 1 deletion src/tv2_offtube_showstyle/__tests__/actions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ describe('Select Server Action', () => {

validateNextPartExistsWithDuration(context, SERVER_DURATION_A)
validateSourcePiecesExistWithPrerollDuration(activePieces)
expect(activePieces.dataStore?.piece.lifespan).toEqual(PieceLifespan.OutOnSegmentEnd)
expect(activePieces.dataStore?.piece.lifespan).toEqual(PieceLifespan.WithinPart)

validateNoWarningsOrErrors(context)
})
Expand Down

0 comments on commit a9171b4

Please sign in to comment.