Question about sync / async for createOffer and createAnswer

It is clear that in some cases it might take a bit of time to generate the offer in cases where operating system resources, particularly hardware codecs, needed to be acquired. However, if this can happen quickly, then there is no need for async call. The questions is how quickly can this happen and how quick is quick enough. We have two proposal sync, and async. 

Sync proposal:

The proposal would be createOffer, and createAnswer, and synchronous and must return in less than 100 ms. Some poking around shows there are devices that would likely take around that amount of time to allocate resources. We have a few questions on this 

1) is this long enough or do some devices needed more time?

We are particularly interested in information from mobile devices and devices where the DSP are separate from the main CPU. 

2) is 100 ms too long for the JS execution to be blocked? 

From initial conversations with a few folks it seems like that might be the cased but we would like to get more feedback on this. If it is, too long, then we likely need to the async proposal. 

Async Proposal

The create offer would take a function something like 

pc.createOffer(function (offer) {
  offer = tweakOffer(offer);
  pc.setLocalDescription("offer", offer);
  // ...
}, hints);

The questions here is 

3) does this look like an OK way to do the async version ?

Whatever we do to createOffer, we will do the corresponding thing to createAnswer. 

Received on Wednesday, 9 May 2012 15:07:38 UTC