Open
Conversation
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
This PR adds a new segmentation initialization mode to support one init segment per fragmented track while preserving the existing combined-init behavior.
The main motivation is Media Source Extensions (MSE) integration: playback setups that require simultaneous multi-audio playback need one
MediaSource(containing itsSourceBuffer) per track, which in turn requires one init segment per track instead of a single combined init segment.Note
This behavior aligns with historical usage, per-track initialization used to be the default behavior.
It stopped being the default in commit 77247e1 (
fix: segmenting will also multiplex the fragmented tracks, Jul 8, 2025), first released inv1.3.1.initializeSegmentationnow supports:initializeSegmentation()/initializeSegmentation('combined')(default):returns a single init segment containing all selected fragmented tracks.
initializeSegmentation('per-track'):returns one init segment per selected fragmented track.
Documentation
Updated
README.mdsegmentation docs (it seems to have been stale documenting the old behavior before 77247e1):initializeSegmentation(mode)with supported values ('combined'and'per-track')setSegmentOptionsanchor link