@@ -39,7 +39,7 @@ import { CurrentPartOrSegmentRemaining } from '../RundownView/RundownTiming/Curr
39
39
import {
40
40
OverUnderClockComponent ,
41
41
PlannedEndComponent ,
42
- TimesSincePlannedEndComponent ,
42
+ TimeSincePlannedEndComponent ,
43
43
TimeToPlannedEndComponent ,
44
44
} from '../../lib/Components/CounterComponents'
45
45
import { AdjustLabelFit } from '../util/AdjustLabelFit'
@@ -351,33 +351,37 @@ function DirectorScreenRender({
351
351
// const currentPartOrSegmentCountdown =
352
352
// timingDurations.remainingBudgetOnCurrentSegment ?? timingDurations.remainingTimeOnCurrentPart ?? 0
353
353
354
- const expectedStart = PlaylistTiming . getExpectedStart ( playlist . timing )
355
- const expectedEnd = PlaylistTiming . getExpectedEnd ( playlist . timing ) || 0
354
+ const expectedStart = PlaylistTiming . getExpectedStart ( playlist . timing ) || 0
355
+ const expectedEnd = PlaylistTiming . getExpectedEnd ( playlist . timing )
356
+ const expectedDuration = PlaylistTiming . getExpectedDuration ( playlist . timing ) || 0
357
+ const now = timingDurations . currentTime ?? getCurrentTime ( )
356
358
357
359
const overUnderClock = getPlaylistTimingDiff ( playlist , timingDurations ) ?? 0
358
360
359
361
return (
360
362
< div className = "director-screen" >
361
363
< div className = "director-screen__top" >
362
- < div className = "director-screen__top__planned-end" >
363
- < div >
364
- < PlannedEndComponent value = { expectedEnd } />
364
+ { expectedEnd ? (
365
+ < div className = "director-screen__top__planned-end" >
366
+ < div >
367
+ < PlannedEndComponent value = { expectedEnd } />
368
+ </ div >
369
+ PLANNED END
365
370
</ div >
366
- PLANNED END
367
- </ div >
368
- { expectedEnd - overUnderClock < 0 ? (
371
+ ) : null }
372
+ { expectedEnd ? (
369
373
< div >
370
374
< div >
371
- < TimeToPlannedEndComponent value = { expectedEnd - overUnderClock } />
375
+ < TimeToPlannedEndComponent value = { now - expectedEnd } />
372
376
</ div >
373
377
< span className = "director-screen__top__planned-to" > TIME TO PLANNED END</ span >
374
378
</ div >
375
379
) : (
376
380
< div >
377
381
< div >
378
- < TimesSincePlannedEndComponent value = { expectedEnd - overUnderClock } />
382
+ < TimeSincePlannedEndComponent value = { getCurrentTime ( ) - ( expectedStart + expectedDuration ) } />
383
+ < span className = "director-screen__top__planned-since" > TIME SINCE PLANNED END</ span >
379
384
</ div >
380
- < span className = "director-screen__top__planned-since" > TIME SINCE PLANNED END</ span >
381
385
</ div >
382
386
) }
383
387
< div >
0 commit comments