- 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
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? ```js setHeaders(headers) { headers = headers.filter(header => tc.headerExtensionsToOffer.some(({uri}) => uri == header.uri)); tc.setOfferedRtpHeaderExtensions(headers); } setHeaders([{uri: "urn:ietf:params:rtp-hdrext:ssrc-audio-level", direction: "stopped"}]); // ? ``` Or is it intended to be something more setParameters-inspired, like this? ```js 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"; } } tc.setOfferedRtpHeaderExtensions(headers); ``` 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