- From: <bugzilla@jessica.w3.org>
- Date: Tue, 22 May 2012 17:56:19 +0000
- To: public-webrtc@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17109 --- Comment #1 from Prakash <prakashr.ietf@gmail.com> 2012-05-22 17:56:19 UTC --- Here are some suggestions on the API. -- 1. Configuration : The PeerConnection should take in a array of configuration object instead of a string. [NoInterfaceObject] interface IceConfiguration { readonly attribute DOMString type; readonly attribute DOMString host; readonly attribute short port; readonly attribute DOMString username; readonly attribute DOMString password; }; type - one of TURN/TURNS/STUN/STUNS host - <hostname/ip> port - port for STUN/TURN username - optional username for STUN/TURN password - optional password for STUN/TURN The reason for the array is that if STUN/TURN fails, the code may have fall back to STUNS/TURNS. Open question: Can users include a separate STUN and TURN server, in which case the provided STUN is used and the TURN server is used for relay purpose only? Note that startIce() takes in a parameter to say no_relay or only_relay. So the implementation has to use that to decide what to connect and not just based on the values provided in the configuration. 2. Error callbacks. STUN and TURN can return a number of errors which has to be bubbled up to JS. A summary of error codes are available here. http://www.iana.org/assignments/stun-parameters/stun-parameters.xml#stun-parameters-6 The options for JS in case of errors are: to either throw it to the user and stop peerconnection if unrecoverable (like relay quota exceeded) or create a new peerconnection (say with a new TURN/STUN configuration - incase of server error or stale credentials) and retry. An error callback is passed on to the PeerConnection along with the iceCallback. [Constructor (DOMString configuration, IceCallback iceCallback, IceErrorCallback iceErrorCallback)] interface PeerConnection { ... } The IceErrorCallback takes in an IceError object [NoInterfaceObject] interface IceError { const unsigned short UNAUTHORIZED = 401; ... readonly attribute unsigned short code; }; code - A subset of http://www.iana.org/assignments/stun-parameters/stun-parameters.xml#stun-parameters-6. To be documented. -- Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. You are the assignee for the bug.
Received on Tuesday, 22 May 2012 17:56:42 UTC