W3C home > Mailing lists > Public > public-webrtc@w3.org > May 2012

[Bug 17109] TURN server API changes

From: <bugzilla@jessica.w3.org>
Date: Tue, 22 May 2012 17:56:19 +0000
To: public-webrtc@w3.org
Message-Id: <E1SWtJj-0002Zq-KM@jessica.w3.org>

--- 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
interface IceConfiguration {
 readonly attribute DOMString type;
 readonly attribute DOMString host;
 readonly attribute short port;
 readonly attribute DOMString username;
 readonly attribute DOMString password;

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.

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

[Constructor (DOMString configuration, IceCallback iceCallback,
IceErrorCallback iceErrorCallback)]
interface PeerConnection {

The IceErrorCallback takes in an IceError object

interface IceError {
    const unsigned short UNAUTHORIZED = 401;

    readonly attribute unsigned short code; 

code - A subset of
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:17:27 UTC