diff --git a/packages/webui/src/client/lib/__tests__/rundownTiming.test.ts b/packages/webui/src/client/lib/__tests__/rundownTiming.test.ts index 1a8e05cd90..20f21ac668 100644 --- a/packages/webui/src/client/lib/__tests__/rundownTiming.test.ts +++ b/packages/webui/src/client/lib/__tests__/rundownTiming.test.ts @@ -168,7 +168,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: undefined, remainingTimeOnCurrentPart: undefined, rundownsBeforeNextBreak: undefined, - segmentStartedPlayback: {}, }) ) }) @@ -270,7 +269,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: undefined, remainingTimeOnCurrentPart: undefined, rundownsBeforeNextBreak: undefined, - segmentStartedPlayback: {}, }) ) }) @@ -372,7 +370,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: undefined, remainingTimeOnCurrentPart: undefined, rundownsBeforeNextBreak: undefined, - segmentStartedPlayback: {}, }) ) }) @@ -478,7 +475,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: undefined, remainingTimeOnCurrentPart: undefined, rundownsBeforeNextBreak: undefined, - segmentStartedPlayback: {}, }) ) }) @@ -605,7 +601,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: undefined, remainingTimeOnCurrentPart: undefined, rundownsBeforeNextBreak: undefined, - segmentStartedPlayback: {}, }) ) }) @@ -760,7 +755,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: false, remainingTimeOnCurrentPart: 2500, rundownsBeforeNextBreak: [], - segmentStartedPlayback: {}, nextRundownAnchor: undefined, }) ) @@ -916,7 +910,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: false, remainingTimeOnCurrentPart: -4000, rundownsBeforeNextBreak: [], - segmentStartedPlayback: {}, nextRundownAnchor: undefined, }) ) @@ -1021,7 +1014,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: undefined, remainingTimeOnCurrentPart: undefined, rundownsBeforeNextBreak: undefined, - segmentStartedPlayback: {}, }) ) }) @@ -1159,7 +1151,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: undefined, remainingTimeOnCurrentPart: undefined, rundownsBeforeNextBreak: undefined, - segmentStartedPlayback: {}, }) ) }) @@ -1280,7 +1271,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: undefined, remainingTimeOnCurrentPart: undefined, rundownsBeforeNextBreak: undefined, - segmentStartedPlayback: {}, }) ) }) @@ -1400,7 +1390,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: undefined, remainingTimeOnCurrentPart: undefined, rundownsBeforeNextBreak: undefined, - segmentStartedPlayback: {}, nextRundownAnchor: undefined, }) ) @@ -1549,7 +1538,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: false, remainingTimeOnCurrentPart: 500, rundownsBeforeNextBreak: [], - segmentStartedPlayback: {}, nextRundownAnchor: 2000, }) ) @@ -1698,7 +1686,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: false, remainingTimeOnCurrentPart: -1500, rundownsBeforeNextBreak: [], - segmentStartedPlayback: {}, nextRundownAnchor: 4000, }) ) @@ -1853,7 +1840,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: false, remainingTimeOnCurrentPart: 500, rundownsBeforeNextBreak: [], - segmentStartedPlayback: {}, nextRundownAnchor: 3000, }) ) @@ -2002,7 +1988,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: false, remainingTimeOnCurrentPart: 500, rundownsBeforeNextBreak: [], - segmentStartedPlayback: {}, nextRundownAnchor: 2000, }) ) @@ -2151,7 +2136,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: false, remainingTimeOnCurrentPart: -1500, rundownsBeforeNextBreak: [], - segmentStartedPlayback: {}, nextRundownAnchor: 4000, }) ) @@ -2306,7 +2290,6 @@ describe('rundown Timing Calculator', () => { breakIsLastRundown: false, remainingTimeOnCurrentPart: 500, rundownsBeforeNextBreak: [], - segmentStartedPlayback: {}, nextRundownAnchor: 3000, }) ) diff --git a/packages/webui/src/client/lib/rundownTiming.ts b/packages/webui/src/client/lib/rundownTiming.ts index ff96d63a1c..a91ebd0d2c 100644 --- a/packages/webui/src/client/lib/rundownTiming.ts +++ b/packages/webui/src/client/lib/rundownTiming.ts @@ -66,7 +66,6 @@ export class RundownTimingCalculator { private partDisplayDurations: Record = {} private partDisplayDurationsNoPlayback: Record = {} private displayDurationGroups: Record = {} - private segmentStartedPlayback: Record = {} private segmentAsPlayedDurations: Record = {} private breakProps: { props: BreakProps | undefined @@ -124,7 +123,6 @@ export class RundownTimingCalculator { let liveSegmentId: SegmentId | undefined Object.keys(this.displayDurationGroups).forEach((key) => delete this.displayDurationGroups[key]) - Object.keys(this.segmentStartedPlayback).forEach((key) => delete this.segmentStartedPlayback[key]) Object.keys(this.segmentAsPlayedDurations).forEach((key) => delete this.segmentAsPlayedDurations[key]) this.untimedSegments.clear() this.linearParts.length = 0 @@ -163,7 +161,7 @@ export class RundownTimingCalculator { if (liveSegment?.segmentTiming?.countdownType === CountdownType.SEGMENT_BUDGET_DURATION) { remainingBudgetOnCurrentSegment = - (this.segmentStartedPlayback[unprotectString(liveSegmentId)] ?? + (playlist.segmentsStartedPlayback?.[unprotectString(liveSegmentId)] ?? lastStartedPlayback ?? now) + (liveSegment.segmentTiming.budgetDuration ?? 0) - @@ -629,7 +627,6 @@ export class RundownTimingCalculator { partDisplayStartsAt: this.partDisplayStartsAt, partExpectedDurations: this.partExpectedDurations, partDisplayDurations: this.partDisplayDurations, - segmentStartedPlayback: this.segmentStartedPlayback, currentTime: now, remainingTimeOnCurrentPart, remainingBudgetOnCurrentSegment, @@ -722,8 +719,6 @@ export interface RundownTimingContext { * if the Part does not have an expected duration. */ partExpectedDurations?: Record - /** Time when selected segments started playback. Contains only the current segment and the segment before, if we've just entered a new one */ - segmentStartedPlayback?: Record /** Remaining time on current part */ remainingTimeOnCurrentPart?: number /** Remaining budget on current segment, if its countdownType === CountdownType.SEGMENT_BUDGET_DURATION */