Re: Validity period of createOffer() offers.

On Sun, Jun 3, 2012 at 8:22 PM, Harald Alvestrand <harald@alvestrand.no> wrote:
> On 06/01/2012 10:55 PM, Eric Rescorla 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);
>>   });
>>
>> 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?
>
> I would regard it as conformant, but not likely to be popular.

My concern here is that the Web site doesn't get to control the
user's browser, so sites need to know what they can expect
from the client.


> Similarly, I would regard an implementation that always rejected this:
>
> pc.createOffer(function(offer) {
>     offer.makeSomeReasonableTweakToTheSDP()
>
>     pc.setLocalDescription("offer", offer);
>  });
>
> as conformant, but not likely to be popular.
>
> I don't see how to easily define conformance (in "always" / MUST terms) in a
> way substantially different from "before anything else executes" and
> "without any changes to the SDP".
> There may be ways to define what a "reasonable SDP change" and a "reasonable
> expectation of later success" is - once we can write tests for them, I'd
> like to investigate those.

I think we clearly need to describe this, since as a site operator, I don't
really want to try to exercise browser features that aren't reliable.

-Ekr

Received on Monday, 4 June 2012 05:21:52 UTC