Skip to content

Commit bac92cc

Browse files
committed
docs(T-Timers): Add client rendering logic for pauseTime
Document the client-side logic for rendering timer states with pauseTime support: - paused === true: use frozen duration - pauseTime && now >= pauseTime: use zeroTime - pauseTime (auto-pause) - otherwise: use zeroTime - now (running normally)
1 parent a90c533 commit bac92cc

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

packages/corelib/src/dataModel/RundownPlaylist.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,20 @@ export interface RundownTTimerModeTimeOfDay {
131131
* When running, the client calculates current time from zeroTime.
132132
* When paused, the duration is frozen and sent directly.
133133
* pauseTime indicates when the timer should automatically pause (when current part ends and overrun begins).
134+
*
135+
* Client rendering logic:
136+
* ```typescript
137+
* if (state.paused === true) {
138+
* // Manually paused by user or already pushing/overrun
139+
* duration = state.duration
140+
* } else if (state.pauseTime && now >= state.pauseTime) {
141+
* // Auto-pause at overrun (current part ended)
142+
* duration = state.zeroTime - state.pauseTime
143+
* } else {
144+
* // Running normally
145+
* duration = state.zeroTime - now
146+
* }
147+
* ```
134148
*/
135149
export type TimerState =
136150
| {

0 commit comments

Comments
 (0)