W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > December 2022

Re: [webrtc-extensions] Potential web compat issue with setOfferedRtpHeaderExtensions (#130)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Mon, 05 Dec 2022 19:15:26 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-1338005567-1670267725-sysbot+gh@w3.org>
We should leave this issue open until all parties agree this is not a problem.

It remains unclear to me how JS is expected to use this API, let alone in a web compatible manner. There's no explainer or examples that I've found.

> To figure out which header extensions are available:
> Read the HeaderExtensionsToOffer attribute, it will contain all header extensions that are supported.

So is the intended use of this API something like this?
setHeaders(headers) {
  headers = headers.filter(header => tc.headerExtensionsToOffer.some(({uri}) => uri == header.uri));

setHeaders([{uri: "urn:ietf:params:rtp-hdrext:ssrc-audio-level", direction: "stopped"}]); // ?
Or is it intended to be something more setParameters-inspired, like this?
const headers = structuredClone(tc.headerExtensionsToOffer); // defeat frozen array
for (const header of headers) {
  if (header.uri == "urn:ietf:params:rtp-hdrext:ssrc-audio-level") {
    header.direction = "stopped";
The current algorirthm doesn't seem to require _extlist_.length  == [[HeaderExtensionsToOffer]].length, so it seems discrete inputs are supported, perhaps suggesting the former?

We went through similar design itereations for *setParameters*, until we landed on an approach that basically enforced the get/set pattern using a transactionId.

GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-extensions/issues/130#issuecomment-1338005567 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 5 December 2022 19:15:30 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:59 UTC