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

track ietf bundlepolicy changes

Open fippo opened this issue 2 years ago • 3 comments

https://datatracker.ietf.org/meeting/111/materials/slides-111-rtcweb-aligning-jsep-and-bundle-00 seems to be the latest on that. tl;dr is max-bundle is deprecated and must-bundle needs to be added.

It also seems we have implementation issues, neither Chrome nor Firefox implement If the remote endpoint is not bundle-aware, negotiate only one media track. correctly, see this newly added test

fippo avatar Oct 15 '21 14:10 fippo

"The most common implementation differed from both of these specs"

Does this mean Chrome? Were other implementations fine (modulo "the remote endpoint is not bundle-aware" issue, which we should probably untangle unless it is core to this issue)?

"In order to prevent unexpected changes to applications relying on the pre-standard behavior, the decision was made to deprecate the use of "max-bundle" and instead introduce a new "must-bundle" policy that, when selected, provides the correct behavior."

Does "when selected" refer to the W3C API? I.e. is the request to update this API by add the following?

enum RTCBundlePolicy {
  "balanced",
  "max-compat",
  "max-bundle",
+ "must-bundle"
 };

...where the latter two are defined the same, with a note that says: "Don't use "max-bundle""?

Since WebIDL enums throw, are applications expected to feature-detect this? E.g. from now on:

let pc;
try {
  pc = new RTCPeerConnection({bundlePolicy: "must-bundle"});
} catch (e) {
  if (e.name != "TypeError") throw e;
  pc = new RTCPeerConnection({bundlePolicy: "max-bundle"});
}

Are we sure this is the best solution for web compat? The alternative would seem to be to leave the enum alone and specify that {bundlePolicy: "max-bundle"} means must-bundle in JSEP from now on. I'm not proposing we do that, merely noting it seems like this decision belongs in the W3C.

jan-ivar avatar Oct 22 '21 19:10 jan-ivar

If one end does max-bundle and the other does must-bundle, will they interoperate?

alvestrand avatar Dec 02 '21 15:12 alvestrand

TL;DR: If we tell sites to start using {bundlePolicy: "must-bundle"} then this will throw on users with old browsers, because enums.

In contrast, new dictionary members are ignored by old browsers, so perhaps we could use that here? Something like (spitballing) {mustBundle: true}

jan-ivar avatar Dec 02 '21 15:12 jan-ivar