- From: <piranna@gmail.com>
- Date: Mon, 13 Jan 2014 08:48:26 +0100
- To: Adam Bergkvist <adam.bergkvist@ericsson.com>
- Cc: public-webrtc <public-webrtc@w3.org>, Luis López Fernández <luis.lopez@urjc.es>
> I'm hesitant to do these changes since they don't enable, or make it > significantly easier to enable, anything that's not possible with the > current API. I see these as convenience things that some developers find > useful; and as you show, it's rather easy to derive these features from the > information provided by the current API. I would be more concerned if you > couldn't write a shim for this in 50, or so, lines of code. > I absolutly agree that they could be viewed as convenience things useful for developers (that are the ones that they will use the API at the last point!), but for example, the list of current DataChannels is also to make the API homogeneous regarding to the fact that you can get a list of the current local and remote streams, list that you could also be able to build externally counting the calls to addStream() and listening to the addstream event. > >> * list of current DataChannels on a PeerConnection object. >> * attribute to identify if a DataChannel object was created by us or >> by the remote PeerConnection object >> * dispatch datachannel event also for locally created DataChannel objects > (third bullet) I would suggest using the open event on the creating side for > this. You get the channel from the target property of the event, and the > channel is in the open state; same state as in the "datachannel" event > handler on the receiving side. > You are right, I didn't remember about the open event that could also help to solve the second bullet, but this give another question: if both events do the same, why don't use only one event? If so, the remote endpoint would dispatch the datachannel event when the new one is created (the same way as it's inmediatly returned in the creator side) and later both endpoints dispatch an open event. I find this more symetric... -- "Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de sitios diferentes, simplemente escribe un sistema operativo Unix." – Linus Tordvals, creador del sistema operativo Linux
Received on Monday, 13 January 2014 07:49:15 UTC