fix(timing-framework): avoidStreamEndFlag and traditional worker alignment#152
Open
qiyundai wants to merge 2 commits into
Open
fix(timing-framework): avoidStreamEndFlag and traditional worker alignment#152qiyundai wants to merge 2 commits into
qiyundai wants to merge 2 commits into
Conversation
avoidStreamEndFlag was reusing stream-ended early-advance paths, causing the schedule to skip to the last timed fragment. Only disable MR blocking; natural underrun and liveStreamEnd still apply when streams actually end. Co-authored-by: Cursor <cursoragent@cursor.com>
Port fast schedule init, validateSchedulePosition, monotonic Akamai time cache with drift detection, and MR underrun toggleTime guard so chrono-box (production path) matches worker.js behavior without blocking on API at init. Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
toggleTimestill selects the current fragment (fixes skip-to-last-slot bug).worker.jsfor schedule behavior and performance:getFastInitialTime+ backgroundvalidateSchedulePosition(no blocking Akamai call before first render)toggleTimebefore early advance (matches module worker)hasToggleTimePassed/parseToggleTimehelpersTest plan
npx wtr test/unit/features/timing-framework/worker.test.js(46 passed)?avoidStreamEndFlag=trueon multi-slot MR schedule shows current-period fragment?serverTime=<ms>&avoidStreamEndFlag=trueat known windowtoggleTimeNotes
worker.test.jstargets the module worker as the reference implementation;worker-traditional.jsis kept logically in sync (see README usage guidelines).Made with Cursor