Re: Improvements suggestion for DataChannels

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.

/Adam

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