-
Notifications
You must be signed in to change notification settings - Fork 115
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
How do I indicate the end of remote candidates? #1952
Comments
So much artifact makes me crazy. APIs are free and semantics is good:
|
The complexity is compounded by the fact that end-of-candidates needs to specify which media section and generation they end. |
Let's forget SDP, "media sections", transceivers and other artifacts. It's clear that end-of-candidates should just affect a specific So |
|
The text examples all appear consistent with each other. So perhaps we can add an example (2). |
Yes, Chrome has a bug. FAIL Add with empty candidate string (end of candidate) should succeed promise_test: Unhandled rejection with value: object "OperationError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Error processing ICE candidate" |
@aboba An example will clarify how to do the end-of-candidates. @jan-ivar Why is it example (2)? Reading the spec tells me @alvestrand Thanks for the response with the Chrome bug. To give you a context: In my applitcation I signal offer, answer and ICE candidates. The |
@boldt Thanks for pointing to the MDN example. It had wrong info in it, and I've fixed it now. PTAL. Hopefully that should clarify its intended use. In short, as a user of the API, signaling of end-of-candidates should happen automatically, provided you blindly forward what
|
@alvestrand Do you know, if Chrome provides any other legacy functionallity for end-of-candidates? @jan-ivar I still wonder about the spec (see my previous previous comment). Let's start with the eventhanlder Looking into the spec, you write: Promise<void> addIceCandidate((RTCIceCandidateInit or RTCIceCandidate) candidate); The Promise expects an I also added the end-of-candidates example (2) to MDN. Thus we have the correct version documented there as well. |
@boldt I think you mean the function expects certain arguments. The promise is just the return value from the function, and has nothing to do with the input arguments to the function. The function expects EITHER RTCIceCandidate OR an RTCIceCandidateInit, a plain dictionary/JS object. An let c1 = new RTCIceCandidate(new RTCIceCandidate({candidate: '...'})); This is a common copy-constructor pattern in JS for data holder interfaces: let e = new Event("test2", new Event("test", {bubbles: true}));
console.log(e.bubbles); // true Come to think of it, this means we can simplify the spec. I'll file an issue. Thanks! |
@boldt Unsure about your MDN change, because users aren't meant to have to signal end-of-candidates manually. Once browsers fix their bugs, Users should typically not interfere with this, and merely forward candidates opaquely. |
I totally agree.
So, how should/will the events on
From a users perspective, I don't want to monitor the states and detect the end of the geathering and send a "proprietary" end-of-candidates. I just want to signal the candidates fired by
Thus I can feed them 1:1 into
|
@boldt Again, addIceCandidate does not take a string as argument. From this spec note, you'll see the following on
Web developers are expected to opaquely serialize everything except
... which completes the iceGatherningState. |
You're right, since you wrote 1.and 3. are wrong.". Thus, your example is exactly what I am expecting. Thanks! |
What is the next step on this issue? |
We've updated the MDN example, so I think this can be closed. |
Following the spec, it's not clear to me how to indicate the end of remote candidates.
You write:
and
and
and
How do you mean this?
pc.addIceCandidate('');
pc.addIceCandidate({candidate:''});
pc.addIceCandidate(new IceCandidate(''));
pc.addIceCandidate(new IceCandidate({candidate:''}));
Non of them works for me in Chrome 67. Probably its not implemented yet?
The text was updated successfully, but these errors were encountered: