forked from Sofie-Automation/sofie-core
-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/sofie 449 duration based timing mode #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jesperstarkar
merged 15 commits into
feat/top-bar-t-timers
from
feat/SOFIE-449-duration-based-timing-mode
Mar 27, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
288c268
Add T-Timers to LSG API (expose underlying data model)
rjmunro 63ed3a4
Add projected state, pauseTime, and anchorPartId to T-Timers LSG API
rjmunro f55d5b2
Add T-Timers to LSG sample client
rjmunro 14ce21e
Support pauseTime in LSG example
rjmunro c4e7c4e
Enhance LSG sample client T-Timer display with state debugging
rjmunro 591683c
Merge branch 'feat/top-bar-t-timers' into rjmunro/t-timers-lsg
jesperstarkar b9b5a9a
feat: adds the Duration timing mode interfaces
jesperstarkar a62b7b0
feat: monkey patch a first frontend implementation of the BBC-centric…
jesperstarkar 5f1a3b1
feat: adds diffing for Duration-mode
jesperstarkar 11c8689
feat: calculate estimated end for Duration mode
jesperstarkar 3ba0f34
chore: refactors moving the new util function into rundownTimings whe…
jesperstarkar 1e430f4
fix: corrects estimated time calculation, taking into account the mod…
jesperstarkar 1f9507f
chore: lint and formatting
jesperstarkar 383fa82
chore: linting
jesperstarkar f7cba06
Merge branch 'feat/top-bar-t-timers' into feat/SOFIE-449-duration-bas…
jesperstarkar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
packages/live-status-gateway-api/api/components/tTimers/tTimerIndex.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| $defs: | ||
| tTimerIndex: | ||
| type: integer | ||
| title: TTimerIndex | ||
| description: Timer index (1-3). The playlist always has 3 T-timer slots. | ||
| enum: [1, 2, 3] |
45 changes: 45 additions & 0 deletions
45
packages/live-status-gateway-api/api/components/tTimers/tTimerStatus.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| $defs: | ||
| tTimerStatus: | ||
| type: object | ||
| title: TTimerStatus | ||
| description: Status of a single T-timer in the playlist | ||
| properties: | ||
| index: | ||
| $ref: './tTimerIndex.yaml#/$defs/tTimerIndex' | ||
| label: | ||
| type: string | ||
| description: User-defined label for the timer | ||
| configured: | ||
| type: boolean | ||
| description: Whether the timer has been configured (mode and state are not null) | ||
| mode: | ||
| description: >- | ||
| Timer configuration/mode defining the timer's behavior. | ||
| Null if not configured. | ||
| oneOf: | ||
| - type: 'null' | ||
| - $ref: './timerMode.yaml#/$defs/timerMode' | ||
| state: | ||
| description: >- | ||
| Current runtime state of the timer. | ||
| Null if not configured. | ||
| oneOf: | ||
| - type: 'null' | ||
| - $ref: './timerState.yaml#/$defs/timerState' | ||
| projected: | ||
| description: >- | ||
| Projected timing for when we expect to reach an anchor part. | ||
| Used to calculate over/under diff. Has the same structure as state. | ||
| Running means progressing towards anchor, paused means pushing/delaying anchor. | ||
| oneOf: | ||
| - type: 'null' | ||
| - $ref: './timerState.yaml#/$defs/timerState' | ||
| anchorPartId: | ||
| description: >- | ||
| The ID of the target Part that this timer is counting towards (the "timing anchor"). | ||
| Optional - null if no anchor is set. | ||
| oneOf: | ||
| - type: string | ||
| - type: 'null' | ||
| required: [index, label, configured, mode, state] | ||
| additionalProperties: false |
57 changes: 57 additions & 0 deletions
57
packages/live-status-gateway-api/api/components/tTimers/timerMode.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| $defs: | ||
| timerModeCountdown: | ||
| type: object | ||
| title: TimerModeCountdown | ||
| description: Countdown timer mode - counts down from a duration to zero | ||
| properties: | ||
| type: | ||
| type: string | ||
| const: countdown | ||
| duration: | ||
| type: number | ||
| description: The original countdown duration in milliseconds (used for reset) | ||
| stopAtZero: | ||
| type: boolean | ||
| description: Whether timer stops at zero or continues into negative values | ||
| required: [type, duration, stopAtZero] | ||
| additionalProperties: false | ||
|
|
||
| timerModeFreeRun: | ||
| type: object | ||
| title: TimerModeFreeRun | ||
| description: Free-running timer mode - counts up from start time | ||
| properties: | ||
| type: | ||
| type: string | ||
| const: freeRun | ||
| required: [type] | ||
| additionalProperties: false | ||
|
|
||
| timerModeTimeOfDay: | ||
| type: object | ||
| title: TimerModeTimeOfDay | ||
| description: Time-of-day timer mode - counts down/up to a specific time | ||
| properties: | ||
| type: | ||
| type: string | ||
| const: timeOfDay | ||
| targetRaw: | ||
| description: >- | ||
| The raw target string as provided when setting the timer | ||
| (e.g. "14:30", "2023-12-31T23:59:59Z", or a timestamp number) | ||
| oneOf: | ||
| - type: string | ||
| - type: number | ||
| stopAtZero: | ||
| type: boolean | ||
| description: Whether timer stops at zero or continues into negative values | ||
| required: [type, targetRaw, stopAtZero] | ||
| additionalProperties: false | ||
|
|
||
| timerMode: | ||
| title: TimerMode | ||
| description: Configuration/mode of a T-timer (defines behavior type) | ||
| oneOf: | ||
| - $ref: '#/$defs/timerModeCountdown' | ||
| - $ref: '#/$defs/timerModeFreeRun' | ||
| - $ref: '#/$defs/timerModeTimeOfDay' |
61 changes: 61 additions & 0 deletions
61
packages/live-status-gateway-api/api/components/tTimers/timerState.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| $defs: | ||
| timerStateRunning: | ||
| type: object | ||
| title: TimerStateRunning | ||
| description: Timer state when running (progressing with real time) | ||
| properties: | ||
| paused: | ||
| type: boolean | ||
| const: false | ||
| description: Whether the timer is paused | ||
| zeroTime: | ||
| type: number | ||
| description: >- | ||
| Unix timestamp (ms) when the timer reaches/reached zero. | ||
| For countdown timers, this is when time runs out. | ||
| For free-run timers, this is when the timer started. | ||
| Client calculates current value relative to this timestamp. | ||
| pauseTime: | ||
| description: >- | ||
| Optional timestamp when the timer should automatically pause | ||
| (e.g., when current part ends and overrun begins). | ||
| oneOf: | ||
| - type: number | ||
| - type: 'null' | ||
| required: [paused, zeroTime] | ||
| additionalProperties: false | ||
|
|
||
| timerStatePaused: | ||
| type: object | ||
| title: TimerStatePaused | ||
| description: Timer state when paused (frozen at a specific duration) | ||
| properties: | ||
| paused: | ||
| type: boolean | ||
| const: true | ||
| description: Whether the timer is paused | ||
| duration: | ||
| type: number | ||
| description: >- | ||
| Frozen duration value in milliseconds. | ||
| For countdown timers, this is remaining time. | ||
| For free-run timers, this is elapsed time. | ||
| pauseTime: | ||
| description: >- | ||
| Optional timestamp when the timer should pause. | ||
| Typically null when already paused. | ||
| oneOf: | ||
| - type: number | ||
| - type: 'null' | ||
| required: [paused, duration] | ||
| additionalProperties: false | ||
|
|
||
| timerState: | ||
| title: TimerState | ||
| description: >- | ||
| Runtime state of a timer, optimized for efficient client rendering. | ||
| When running, the client calculates current time from zeroTime. | ||
| When paused, the duration is frozen and sent directly. | ||
| oneOf: | ||
| - $ref: '#/$defs/timerStateRunning' | ||
| - $ref: '#/$defs/timerStatePaused' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ enum: | |
| - none | ||
| - forward-time | ||
| - back-time | ||
| - duration | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.