Re: pc.localDescription sync/async issue

On 14/12/14 13:17, Adam Bergkvist wrote:
> On 12/12/14 21:30, Martin Thomson wrote:
>> On 12 December 2014 at 11:24, Jan-Ivar Bruaroey <jib@mozilla.com> wrote:
>>> "The localDescription attribute MUST return the RTCSessionDescription that
>>> was most recently passed to setLocalDescription(), plus any local candidates
>>> that have been generated by the ICE Agent since then."
>>
>>
>> Maybe it would be better if:
>>
>> "The localDescription attribute includes the last
>> RTCSessionDescription that was successfully set using
>> setLocalDescription(), which is modified to include any local
>> candidates that have been generated by the ICE agent since then."
>>
>
> This would be an improvement to the current text (which is pretty outdated).
>
> How and when the description is set is specified in the
> setLocal/RemoteDescription section. There it says the the new
> description is set when the success callback fires. I believe that's the
> way it's usually done when an attribute is updated by an async operation.
>
>
>   From the spec:
>
> * If the RTCSessionDescription argument is applied successfully, then
> user agent must queue a task runs the following steps:
>
>       ...
>
>       3. Set connection's description attribute ( localDescription or
> remoteDescription depending on the setting operation) to the
> RTCSessionDescription argument.

Proposed fix: 
https://github.com/w3c/webrtc-pc/commit/e067401199934deabc6ddf4958785c9c13699a22

/Adam


Received on Sunday, 14 December 2014 12:27:14 UTC