[Bug 25836] add note about addtrack being async

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25836

--- Comment #4 from Adam Bergkvist <adam.bergkvist@ericsson.com> ---
(In reply to Harald Alvestrand from comment #2)
> The addtrack operation is synchronous, but it causes things to happen that
> are easier to describe as a queued task (stuff that happens in stable state).
> 
> Exemplar case:
> 
> createOffer().then(offer =>)
> AddTrack(track)
> 
> Will the offer include the added track or not?

What do we want the answer to be?

With addTrack() async the answer is *no*. The task that adds the tracks is
still on the operations queue when the createOffer task is picked up.

With addTrack(), with a return value, we can decide how we want it to be. If a
snapshot of the added tracks is taken when createOffer() is picked up by the JS
scheduler and stored for later processing in the queued operation, the answer
is *no*. If we don't look at the added tracks until the createOffer task is
picked up, then the track will be included and the answer is *yes*.

We need to document this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

Received on Tuesday, 4 November 2014 13:54:07 UTC