File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
webui/src/client/ui/RundownView Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,10 @@ export namespace PlaylistTiming {
3434 return timing . type === PlaylistTimingType . BackTime
3535 }
3636
37- export function getExpectedStart ( timing : RundownPlaylistTiming ) : number | undefined {
37+ export function getExpectedStart ( timing : RundownPlaylistTiming , useRehearsalTime ?: boolean ) : number | undefined {
38+ if ( useRehearsalTime && timing . rehearsalStartTime ) {
39+ return timing . rehearsalStartTime
40+ }
3841 if ( PlaylistTiming . isPlaylistTimingForwardTime ( timing ) ) {
3942 return timing . expectedStart
4043 } else if ( PlaylistTiming . isPlaylistTimingBackTime ( timing ) ) {
@@ -47,7 +50,10 @@ export namespace PlaylistTiming {
4750 }
4851 }
4952
50- export function getExpectedEnd ( timing : RundownPlaylistTiming ) : number | undefined {
53+ export function getExpectedEnd ( timing : RundownPlaylistTiming , isRehearsalTime ?: boolean ) : number | undefined {
54+ if ( isRehearsalTime && timing . rehearsalStartTime ) {
55+ return timing . expectedDuration ? timing . rehearsalStartTime + timing . expectedDuration : undefined
56+ }
5157 if ( PlaylistTiming . isPlaylistTimingBackTime ( timing ) ) {
5258 return timing . expectedEnd
5359 } else if ( PlaylistTiming . isPlaylistTimingForwardTime ( timing ) ) {
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ export function TimingDisplay({
3131
3232 if ( ! rundownPlaylist ) return null
3333
34- const expectedStart = PlaylistTiming . getExpectedStart ( rundownPlaylist . timing )
35- const expectedEnd = PlaylistTiming . getExpectedEnd ( rundownPlaylist . timing )
34+ const expectedStart = PlaylistTiming . getExpectedStart ( rundownPlaylist . timing , rundownPlaylist . rehearsal )
35+ const expectedEnd = PlaylistTiming . getExpectedEnd ( rundownPlaylist . timing , rundownPlaylist . rehearsal )
3636 const expectedDuration = PlaylistTiming . getExpectedDuration ( rundownPlaylist . timing )
3737 const showEndTiming =
3838 ! timingDurations . rundownsBeforeNextBreak ||
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ export function PlaylistStartTiming({
2222} : IStartTimingProps ) : JSX . Element {
2323 const { t } = useTranslation ( )
2424
25- const playlistExpectedStart = PlaylistTiming . getExpectedStart ( rundownPlaylist . timing )
26- const playlistExpectedEnd = PlaylistTiming . getExpectedEnd ( rundownPlaylist . timing )
25+ const playlistExpectedStart = PlaylistTiming . getExpectedStart ( rundownPlaylist . timing , rundownPlaylist . rehearsal )
26+ const playlistExpectedEnd = PlaylistTiming . getExpectedEnd ( rundownPlaylist . timing , rundownPlaylist . rehearsal )
2727 const playlistExpectedDuration = PlaylistTiming . getExpectedDuration ( rundownPlaylist . timing )
2828 const expectedStart = playlistExpectedStart
2929 ? playlistExpectedStart
You can’t perform that action at this time.
0 commit comments