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

RTCIceGathererIceErrorEvent hostCandidate #474

Closed
robin-raymond opened this issue Apr 19, 2016 · 6 comments
Closed

RTCIceGathererIceErrorEvent hostCandidate #474

robin-raymond opened this issue Apr 19, 2016 · 6 comments

Comments

@robin-raymond
Copy link
Contributor

We have defined hostCandidate as a DOMString:

hostCandidate of type DOMString
The hostCandidate attribute is the local IP address and port used to communicate with the STUN or TURN server.

partial dictionary RTCIceGathererIceErrorEventInit : EventInit {
             DOMString      hostCandidate;
};

But shouldn't it be the actual structure:

partial dictionary RTCIceGathererIceErrorEventInit : EventInit {
             RTCIceGatherCandidate hostCandidate;
};

Seems it would be easier to correlate if we made an exact description.

Also, what would happen if there are no host candidates (privacy filter)?

enum RTCIceGatherPolicy {
    "all",
    "nohost",
    "relay"
};

nohost
The RTCIceGatherer gathers all ICE candidate types except for host candidates.

@robin-raymond
Copy link
Contributor Author

Also last WebRTC has differences in definition...

WebRTC:

dictionary RTCPeerConnectionIceErrorEventInit : EventInit {
             DOMString      hostCandidate;
             DOMString      url;
             unsigned short errorCode;
             USVString      statusText;
};

[ Constructor (DOMString type, RTCPeerConnectionIceErrorEventInit eventInitDict)]
interface RTCPeerConnectionIceErrorEvent : Event {
    readonly        attribute DOMString      hostCandidate;
    readonly        attribute DOMString      url;
    readonly        attribute unsigned short errorCode;
    readonly        attribute USVString      errorText;
};

ORTC:

dictionary RTCIceGathererIceErrorEventInit : EventInit {
             DOMString      hostCandidate;
             DOMString      url;
             unsigned short errorCode;
             USVString      errorText;
};

[ Constructor (DOMString type, RTCIceGathererIceErrorEventInit eventInitDict)]
interface RTCIceGathererIceErrorEvent : Event {
    readonly        attribute DOMString      hostCandidate;
    readonly        attribute DOMString      url;
    readonly        attribute unsigned short errorCode;
    readonly        attribute USVString      errorText;
};

I think ti's WebRTC that has the mistake with statusText...

@aboba
Copy link
Contributor

aboba commented Apr 20, 2016

Yes, WebRTC has the error with statusText.

If RTCIceGatherPolicy === "nohost" then no host candidates would be gathered but the host candidate would still exist and be filled in within the dictionary.

@aboba
Copy link
Contributor

aboba commented Apr 20, 2016

All we want here is the IP address and port of the host candidate, not everything that is in the RTCIceGatherCandidate object:

dictionary RTCIceCandidate {
DOMString foundation;
unsigned long priority;
DOMString ip;
RTCIceProtocol protocol;
unsigned short port;
RTCIceCandidateType type;
RTCIceTcpCandidateType tcpType;
DOMString relatedAddress = "";
unsigned short relatedPort;
};

@robin-raymond
Copy link
Contributor Author

@aboba Assuming we need the host information at all (which is a different justification), then I would say a pointer to the candidate object (not duplicate of the information contained within) is needed to more easily correlate fully, not just the DOMString; unless the assumption is that this will only happen with UDP-based host candidates, never TCP, and thus there's enough to disambiguate with just the host ip+port string (probably true I'm guessing). But then again, I'm not sure what the original justification was about...

@robin-raymond
Copy link
Contributor Author

robin-raymond commented Apr 21, 2016

dictionary RTCIceGathererIceErrorEventInit : EventInit {
             RTCIceCandidate? hostCandidate;
             DOMString      url;
             unsigned short errorCode;
             USVString      statusText;
};

If unreachable, the hostCandidate would be null since all hosts are unreachable to the destination. Likewise, the hostCandidate would be null if the browser is in a privacy mode disallowing emitting of host candidates.

@robin-raymond
Copy link
Contributor Author

Great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants