Re: Validity period of createOffer() offers.

On 6/1/12 1:55 PM, "Eric Rescorla" <ekr@rtfm.com> wrote:

> The specification explicitly states that the following snippet is
> guaranteed to succeed (S 4.1.11.2):
> 
>   pc.createOffer(function(offer) {
>     pc.setLocalDescription("offer", offer);
>   });
> 
> 
> Now consider the following snippet:
> 
>   pc.createOffer(function(offer) {
>     setTimeout(function() {
>          pc.setLocalDescription("offer", offer);
>       }, 1000);
>   });
> 
>>> On the similar lines I am not sure what should be the user agent behavior
for JavaScript mistakes like this
   for(I -> 1 till 100)
   pc.createOffer(function(offer) {
     //do nothing 
  });
  pc.createOffer(function(offer)) {
    //set local description
   });
  
How should the resources be handled in this case ? Is this implementation
specific ?? 
  

> The spec suggests that this is not guaranteed to succeed, but is it
> reasonable for the application programmer to expect it to
> succeed? Phrased differently, would an implementation which refused
> any setLocalDescription() outside of the createOffer() callback
> even if no other conditions had changed be conformant?
> 
> -Ekr
> 

Received on Friday, 1 June 2012 21:04:11 UTC