fix: previousPartKeepaliveDuration calculations#1665
fix: previousPartKeepaliveDuration calculations#1665imaretic wants to merge 1 commit intoSofie-Automation:mainfrom
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
About the Contributor
This PR is posted on behalf of EVS Broadcast Equipment.
Type of Contribution
This is a: Bug fix
Current Behavior
When a part is defined with
inTransitionandpreviousPartKeepaliveDuration, the timing calculations behave inconsistently.Part's
expectedDurationWithTransitioncalculation:previousPartKeepaliveDuration.Playout duration of the previous part:
previousPartKeepaliveDuration.This behavior also does not match expected durations in interactive demo as described on "Part and Piece Timings" documentation page.
New Behavior
This PR adjusts the timing calculations:
expectedDurationWithTransitionis no longer reduced by the value ofpreviousPartKeepaliveDuration.previousPartKeepaliveDurationinto account when determining the part’s group enable timing.Testing
Affected areas
This PR affects the timing calculation in the Rundown during playout.
Time Frame
Not urgent, but we would like to get this merged into the in-development release.
Other Information
Status
Summary
This PR fixes timing calculations for parts with
inTransitionandpreviousPartKeepaliveDurationset, addressing inconsistencies in rundown playout timing.Changes
packages/corelib/src/playout/timings.ts
calculateExpectedDurationWithTransitionto subtractfromPartKeepalivefrom the timing calculation alongside existing subtractions (toPartDelay,fromPartPostroll)(fromPartRemaining - toPartDelay - fromPartPostroll)to(fromPartRemaining - toPartDelay - fromPartPostroll - fromPartKeepalive)fromPartRemainingand therefore must be excluded from the expected duration reductionpackages/job-worker/src/playout/timeline/rundown.ts
createCurrentPartGroupEnablefunction signature to acceptnextPartInfo: SelectedPartInstanceTimelineInfo | undefinedinstead of a booleanhasNextPartparameterbuildTimelineObjsForRundownto passpartInstancesInfo.nextdirectly instead of a booleannextPartInfo.calculatedTimings.fromPartRemaining, which extends the current part's duration to account for the next part's overlap/keepalive windowautoNextandexpectedDurationdefined)These changes ensure that timing display in the UI correctly reflects the actual playout behavior and aligns with the interactive timings demo documentation.