W3C home > Mailing lists > Public > public-webrtc@w3.org > January 2014

Re: Improvements suggestion for DataChannels

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Mon, 13 Jan 2014 08:21:54 +0100
Message-ID: <52D39412.5050901@ericsson.com>
To: "piranna@gmail.com" <piranna@gmail.com>, public-webrtc <public-webrtc@w3.org>
On 2014-01-10 10:31, piranna@gmail.com wrote:
> I've re-take my work with the DataChannels and I've got some
> interrelated improvement suggestions to simplify it's API:

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.

> * 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.

Received on Monday, 13 January 2014 07:22:18 UTC

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