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

Query: Callback in PeerConnection constructor - appropriate?

From: Harald Alvestrand <harald@alvestrand.no>
Date: Mon, 12 Mar 2012 14:06:20 +0100
Message-ID: <4F5DF4CC.5030105@alvestrand.no>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>

this is a floating query...... something I don't understand, so I'm asking.

In the current JSEP draft, we have:

    [Constructor (in DOMString configuration, in IceCallback iceCb)]
    interface PeerConnection {

..... and then later ....

              attributeFunction?       onconnecting  <http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-onconnecting>;
              attributeFunction?       onopen  <http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-onopen>;
              attributeFunction?       onstatechange  <http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-onstatechange>;
              attributeFunction?       onaddstream  <http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-onaddstream>;
              attributeFunction?       onremovestream  <http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-onremovestream>;

Now, setting this in the constructor has two properties:
- It can never be NULL
- It can never be changed

In the old API, it kind of made sense, because the API would never work 
without this function.
In the new API, .... perhaps not so much.

What would people think of changing the ICE callback into an 
"onicecandidate" attribute Function, and leaving the configuration 
(which needs to go form a string to a dict too) alone in the constructor?

Received on Monday, 12 March 2012 13:06:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:27 UTC