Skip to content

RTCEncodedAudioFrame and RTCEncodedVideoFrame constructors handling of changed metadata #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
youennf opened this issue Apr 1, 2025 · 1 comment

Comments

@youennf
Copy link
Collaborator

youennf commented Apr 1, 2025

Currently, the spec allows changing all metadata to any value.

Looking at what Chrome does, it validates a lot the metadata.
For instance, for audio frames, it seems that only RTP timestamp can be changed.

Either the constructor ignores other metadata or it throws.

I wonder whether:

  1. We should not have dictionaries for modifiable audio and video metadata. For audio, only RTP timestamp would be listed in that dictionary.
  2. We add validation rules as needed.
@guidou
Copy link
Collaborator

guidou commented Apr 10, 2025

Note that the Chrome behavior is in many cases buggy. Some operations throw because they haven't been implemented yet, not because they shouldn't work.
But there might be some metadata fields where it makes sense to reject setting a value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants