-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Labels
editorialchanges to wording, grammar, etc that don't modify the intended behaviorchanges to wording, grammar, etc that don't modify the intended behavior
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.
Metadata
Metadata
Assignees
Labels
editorialchanges to wording, grammar, etc that don't modify the intended behaviorchanges to wording, grammar, etc that don't modify the intended behavior