From 5fccb9710360d6e22fb67ac8a8d9f2db258a86f2 Mon Sep 17 00:00:00 2001 From: Rasmus Lindved Date: Mon, 18 Sep 2023 17:11:30 +0200 Subject: [PATCH] SOF-1539 No longer uses 'while x' for server Parts and Pieces. Now they have a simple 'start=0' --- src/tv2-common/content/server.ts | 12 ++---------- src/tv2-common/parts/server.ts | 2 +- src/tv2_offtube_showstyle/__tests__/actions.spec.ts | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/tv2-common/content/server.ts b/src/tv2-common/content/server.ts index 5aa5a773..cc244c90 100644 --- a/src/tv2-common/content/server.ts +++ b/src/tv2-common/content/server.ts @@ -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, @@ -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, diff --git a/src/tv2-common/parts/server.ts b/src/tv2-common/parts/server.ts index 981e5f7c..de6bd729 100644 --- a/src/tv2-common/parts/server.ts +++ b/src/tv2-common/parts/server.ts @@ -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, diff --git a/src/tv2_offtube_showstyle/__tests__/actions.spec.ts b/src/tv2_offtube_showstyle/__tests__/actions.spec.ts index 846e592d..b33ddb61 100644 --- a/src/tv2_offtube_showstyle/__tests__/actions.spec.ts +++ b/src/tv2_offtube_showstyle/__tests__/actions.spec.ts @@ -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) })