No convenient way of rebasing AudioData timestamp
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.3k
- Forks
- 194
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
audioData.timestamp is immutable, by design. There is however no convenient way of creating a new AudioData object with a different timestamp. Currently, users have to copy out data (plane by plane) and pass in the same sampleRate, numberofFrames, numberOfChannels parameters.
This issue tracks a proposal to add a new AudioData constructor, which mirrors VideoFrame's "copy constructor".
interface AudioData {
constructor(AudioData audioData, AudioDataCopyInit init)
[...]
}
AudioDataCopyInit {
required long long timestamp; // microseconds
}
The new constructor would copy all the data and metadata from the passed in audioData, and replace the original timestamp with the one passed in the AudioDataCopyInit.
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 reviewing the AudioData constructor and the existing VideoFrame copy-constructor pattern described in the issue. Determine how the proposed AudioDataCopyInit should preserve data and metadata while replacing only the timestamp. Done means the proposal is specified consistently with the existing WebCodecs API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- api, audio-video-rtc
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100