Repository navigation
quest: plan the audio groupDuration backport to release #7268
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
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # [S] Backport the audio groupDuration to release | ||
|
|
||
| ## Goal | ||
|
|
||
| `@moq/publish` on `release` gains `Audio.Encoder`'s `groupDuration`, as | ||
| [moq-dev/moq#4910](https://github.com/moq-dev/moq/pull/4910) added on main, | ||
| and publishes it as 0.5.4 (npm has up to 0.5.3). A publisher can then pack | ||
| several Opus frames per group. On relays that end a subscription when a newer | ||
| group starts while an older one is still arriving | ||
| ([cloudflare/moq-rs#238](https://github.com/cloudflare/moq-rs/issues/238)), | ||
| that makes the bug rarer but does not avoid it: congestion near a group | ||
| boundary can still trigger it. | ||
|
|
||
| ## Plan | ||
|
|
||
| Decided 2026-10-29 (maintainer): backport #4910 as-is with its default of 0, | ||
| one group per frame, the same as main. Why: per-frame groups let audio frames | ||
| be reordered and dropped independently, and a longer group costs some audio | ||
| quality, so it stays opt-in. The reporter measured that 250 to 1000 ms works on | ||
| Cloudflare's relay. | ||
|
|
||
| Decided 2026-10-29 (maintainer): leave the catalog `description` re-subscribe | ||
| reported in the same issue alone on `release`. Why: main already probes the Opus | ||
| description before advertising the rendition, so the next major release carries | ||
| the fix. | ||
|
|
||
| Port the `js/publish/src/audio/encoder.ts` change and its tests onto | ||
| `release`'s encoder: validate `groupDuration` in the config effect like | ||
| `fade`, open a group on the first frame at least `groupDuration` past the | ||
| open group's start, and reset the start at a discontinuity. Update | ||
| `release`'s `doc/lib/js/publish.md` and `js/publish/README.md` if they | ||
| document the encoder's props, and the API report if `release` keeps one. | ||
| Skip #4910's Rust `moq-audio`, bench, and Nightly changes. Bump | ||
| `@moq/publish` to 0.5.4 in `js/publish/package.json` and `bun.lock`. | ||
|
|
||
| Public API: additive (`groupDuration` on `Audio.Encoder` and its props). Wire: | ||
| none. | ||
|
|
||
| ## Closes | ||
|
|
||
| - [#7267](https://github.com/moq-dev/moq/issues/7267) - groupDuration ships in an npm release | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: moq-dev/moq
Length of output: 329
Script executed:
Repository: moq-dev/moq
Length of output: 15324
Script executed:
Repository: moq-dev/moq
Length of output: 41973
Script executed:
Repository: moq-dev/moq
Length of output: 20760
Script executed:
Repository: moq-dev/moq
Length of output: 7279
State the
groupDurationvalidation and failure path.groupDurationmust be a finite, non-negativeMillivalue. RejectNaN, infinities, and negative values by throwing from the config effect. The invalid value leaves the config unresolved and marks the encoder as settled through the config-effect failure path. It does not setout.error, which is reserved for fatal encoding failures.Suggested plan wording
Committable suggestion