webrtc-pc icon indicating copy to clipboard operation
webrtc-pc copied to clipboard

addTransceiver does not check for uniqueness of rid

Open docfaraday opened this issue 3 years ago • 2 comments

When passing more than one sendEncoding to addTransceiver, there is nothing in the spec about verifying that the rid properties are unique. This is necessary, in my opinion.

docfaraday avatar May 11 '22 13:05 docfaraday

I've tested this and all browsers allow it. I agree it would be better if it threw.

const transceiver = pc.addTransceiver("video", {sendEncodings: [{rid: "hi"}, {rid: "hi"}]});

For symmetry how is a remote offer with a=simulcast:recv hi;hi treated?

jan-ivar avatar Sep 08 '22 01:09 jan-ivar

RFC 8853 does not seem to prohibit duplicate rids in the simulcast attribute, although generating a simulcast attribute with duplicates would definitely be silly. I guess the appropriate thing to do is to ignore duplicates?

docfaraday avatar Sep 08 '22 14:09 docfaraday