Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTCIceTransport role before start() called #4

Open
steveanton opened this issue Jun 12, 2018 · 5 comments
Open

RTCIceTransport role before start() called #4

steveanton opened this issue Jun 12, 2018 · 5 comments
Labels
PR needed A pull request is needed.

Comments

@steveanton
Copy link
Collaborator

The RTCIceTransport role attribute is inherited from the WebRTC-PC specification.

It's not clear what the role attribute should be before start() is called. Should role be an optional?

The WebRTC-PC specification does not have this problem since an RTCIceTransport is not created until the offer/answer exchange has started.

@aboba
Copy link
Contributor

aboba commented Jun 12, 2018

In ORTC, role does not take on a value prior to calling start(). From http://draft.ortc.org/#rtcicegatherer-overview* :

"As noted in [RFC5245] Section 7.1.2.2, an incoming connectivity check contains an ICE-CONTROLLING or ICE-CONTROLLED attribute, depending on the role of the ICE agent initiating the check. Since an RTCIceGatherer object does not have a role, it cannot determine whether to respond to an incoming connectivity check with a 487 (Role Conflict) error; however, it can validate that an incoming connectivity check utilizes the correct local username fragment and password, and if not, can respond with an 401 (Unauthorized) error, as described in [RFC5389] Section 10.1.2.

For incoming connectivity checks that pass validation, the RTCIceGatherer MUST buffer the incoming connectivity checks so as to be able to provide them to associated RTCIceTransport objects so that they can respond."

Also from http://draft.ortc.org/#dom-rtcicetransport-start :

"Since start() provides role information, as well as the remote username fragment and password, once start() is called an RTCIceTransport object can respond to incoming connectivity checks based on its configured role."

@aboba aboba added the PR needed A pull request is needed. label Jun 12, 2018
@foolip
Copy link
Member

foolip commented Aug 8, 2018

Nullable enums are very rare on the web platform, to the point that it's been suggested to simply disallow it in Web IDL: whatwg/webidl#213

The suggested alternative pattern is simply another enum value which represents this state, which could the empty string, or in this case perhaps "pending", "unknown" or similar.

@foolip
Copy link
Member

foolip commented Aug 8, 2018

@alvestrand
Copy link
Collaborator

What we've done with several states on the platform is to name the just-created-but-not-ready-for-prime-time state "new". That would work for me here too - can't be mistaken for anything else.

@lgrahl
Copy link

lgrahl commented Aug 13, 2018

An explicit unknown role sounds good to me. But I think start() shouldn't allow for it to be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR needed A pull request is needed.
Projects
None yet
Development

No branches or pull requests

5 participants