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

> Compare to [setOfferedRtpHeaderExtensions](https://w3c.github.io/webrtc-extensions/#dom-rtcrtptransceiver-setofferedrtpheaderextensions), where leaving out a header extension means: don't modify it and leave it as-is
Right, so
```
const pc = new RTCPeerConnection();
const t = pc.addTransceiver('audio');
t.setOfferedRtpHeaderExtensions([{uri: "urn:ietf:params:rtp-hdrext:ssrc-audio-level", direction: "stopped"}]);
const offer = await pc.createOffer();
console.log(offer.sdp.split('\r\n').filter(l => l.startsWith('a=extmap:')))
```
will, in Chrome, remove ssrc-audio-level but leave the other three extensions untouched.

That should be easy to fix by changing https://w3c.github.io/webrtc-extensions/#methods to look at (a copy of) the offered header extensions with everything set to stopped, then enabling based on the input.


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 7 December 2022 07:47:37 UTC