- From: Bernard Aboba <Bernard.Aboba@microsoft.com>
- Date: Wed, 16 Mar 2016 21:24:11 +0000
- To: Peter Thatcher <pthatcher@google.com>
- CC: Philipp Hancke <philipp.hancke@googlemail.com>, "public-ortc@w3.org" <public-ortc@w3.org>
- Message-ID: <BLUPR03MB149341B5298DC24F9FD95DDEC8A0@BLUPR03MB149.namprd03.prod.outlook.com>
On Fri, Nov 27, 2015 at 3:43 PM, Peter Thatcher wrote: > With the current API, is it viable to construct an IceGatherer but delay > attaching the onlocalcandidate event handler until IceCandidates are desired > ? > Yes, that's possible, however: 1. It's clunky. 2. It has the side effect that just to generate some text (an offer), you have to start gathering candidates, which means STUN and TURN network traffic. Now, I suppose we could tell the gatherer "gather with policy == none right now" and then later say "ok, gather with policy == all". But that's even more clunky. [BA] In addition to being clunky, “gather upon construction” has proven difficult to implement. For example, in C/C++ or C#, if you don’t attach an event handler, the events vanish. So workarounds are required (like creating a bogus event handler and queuing the events until the JS event handler is attached). > The premise of Issue 224 is that the gatherPolicy passed in the > IceGatherer constructor determines whether the IceGatherer gathers upon > construction or not (if "none" is passed). Therefore a start() method > would need a gatherPolicy argument so as to allow setting a policy > different from "none". If we go with Peter's proposal, we would not need a > "none" gatherPolicy, and could forgo the argument to start(), correct? > [pthatcher] I think you're right. We either have a none policy or a start method. I prefer the latter. It's less clunky. [BA] Can you review the following PR (which adds the gather() method): https://github.com/openpeer/ortc/pull/432
Received on Wednesday, 16 March 2016 21:24:40 UTC