Support delayed create of SourceBuffer
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 2.8k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 27
Description
Is your feature request related to a problem? Please describe.
I have an M3U8 playlist with only audio data for the first few seconds, and then both audio and video data are available. At this point, hls.js will report an error because the video sourceBuffer cannot be found. By checking the hls.js code, I learned that the sourceBuffer seems to only be created during initialization based on the track type owned by the first ts file;
Describe the solution you'd like
Can you support changing existing sourceBuffers based on actual changes in track types? At least for me, I need to adapt to the addition of track types
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the hls.js initialization path where SourceBuffers are created from the track types in the first TS segment. Review how later audio and video track changes are handled, then define tests for a playlist that begins with audio only and later adds video. Done means the added track type receives a usable SourceBuffer without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- audio-video-rtc, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100