- From: Harald Alvestrand <harald@alvestrand.no>
- Date: Thu, 09 Jul 2015 10:47:02 +0200
- To: public-webrtc@w3.org
Den 07. juli 2015 11:03, skrev Dominique Hazael-Massieux: > Hi, > > The current WebRTC API asks to reject ICE candidates that are added when > they are "malformed" with a SyntaxError. > > I'm proposing in https://github.com/w3c/webrtc-pc/pull/242 to remove > that specific error case, because: > > * there is no definition of what it means for an ICE candidate to be > malformed (the RFC doesn't define such a term) I think you're right. Syntax errors should be caught when constructing the RTCIceCandidate from the string, not when pushing the RTCIceCandidate into the PC. But the error should be SyntaxError, and it should happen whenever the candidate doesn't conform to the IceCandidate ABNF in the RFC. Where is it appropriate to say that this is a requirement on the RTCIceCandidate constructor? (and is this indeed appropriate?) > > * no browser seems to be doing this at the moment It definitely fails on adding to the PC, not on construction. (Chrome 43) x = new webkitRTCPeerConnection(null) y = new RTCIceCandidate({candidate: 'foo', sdpMLineIndex: 1}) RTCIceCandidate {} (no error) x.addIceCandidate(y) VM501:2 Uncaught DOMException: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': The ICE candidate could not be added. at Error (native) > > * if the ICE candidate can't be applied (including if it's "malformed" > for some definition of the term), an error will be emitted in any case; > it's not clear to me that there is particular value in distinguishing > that case from others > > Thoughts? > > Dom >
Received on Thursday, 9 July 2015 08:47:34 UTC