W3C home > Mailing lists > Public > public-webrtc@w3.org > July 2011

Re: Mozilla/Cisco API Proposal - listening

From: Anant Narayanan <anant@mozilla.com>
Date: Fri, 15 Jul 2011 16:05:00 -0700
Message-ID: <4E20C79C.70908@mozilla.com>
To: public-webrtc@w3.org
On 7/15/11 2:59 PM, Ralph Giles wrote:
> After further discussion it seems the situation is a bit more
> complicated. The event loop, as described in Ian's reference[1] does
> make this safe, by positing multiple task queues which can be
> prioritized separately.
>
> However, we don't currently implement this in gecko. We have a number
> of hacks to make some sorts of nested event loops work better, but I'm
> not longer clear that this race would be absolutely prevented until
> the htm5 event-loop implementation is complete.

I would very much like for explicit connect() and listen() methods even 
if we do end up implementing nested event loops in Gecko. In my opinion, 
code just reads cleaner when you say:

var conn = new PeerConection(...);
conn.onRemoteStreamAdded = function(stream) {
   console.log("stream was added");
};
conn.connect();

instead of omitting the connect() and hoping that your 
onRemoteStreamAdded callback will be called magically.

It also makes clear the distinction between streams that were added 
before the RTP negotiation happened, and those that were added after and 
sets expectations accordingly.

-Anant
Received on Friday, 15 July 2011 23:05:37 UTC

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