Add seeking example to explainer / samples
Open
Nobody has claimed this yet.
editorial
- Dominant language
- HTML
- Stars
- 1.3k
- Forks
- 194
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
In response to user request: "How do we "seek" with the audio decoder?"
The recommendation is
- call
decoder.reset()to drop any pending/queued work - call
decoder.configure(...)since reset() requires that. if the seek target has the same config as before, simply provide that config again to configure(). - call
decoder.decode(...)with packets starting at the timestamp you're seeking to. Note, you'll need to start with a key frame, but this is mostly not a worry for audio. For video, a typical approach (like used for<video>) would be to start with the key frame at-or-before your seek time, then discard outputs at the output callback until you see the first output with the time you desire.
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 locating the explainer and samples referenced in the issue, then inspect how audio decoder examples are organized. Add a seeking example that demonstrates the reset, configure, and decode sequence described here, including the key-frame guidance, and verify that the sample makes the expected seeking behavior clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100