Re: asynchrony for addStream w/ error/success callbacks

On 2014-01-16 02:01, Justin Uberti wrote:
>
>
>
> On Wed, Jan 15, 2014 at 4:44 PM, Martin Thomson
> <martin.thomson@gmail.com <mailto:martin.thomson@gmail.com>> wrote:
>
>     I'll point out the commented text in the specification regarding
>     addStream and constraints:
>
>                    <!--li>
>                      <p>Parse the <var>constraints</var> provided by the
>     application
>                      and apply them to the MediaStream, if possible. If the
>                      constraints could not be successfully applied, the
>     user agent
>                      MUST queue a task to invoke
>     <var>failureCallback</var> with a
>                      <code>DOMError</code> object whose
>     <code>name</code> attribute
>                      has the value
>     <code>IncompatibleConstraintsError</code>.</p>
>                    </li>
>
>                    <li>
>                      <p>If the stream has a <var>peerIdentity</var>
>     constraint
>                      set and the <code><a>RTCPeerConnection</a></code>
>     is in a
>                      connected state, check that the remote identity
>     matches the
>                      constraint. If there is no match,  the user agent
>     MUST queue a
>                      task to invoke <var>failureCallback</var> with a
>                      <code>DOMError</code> object whose
>     <code>name</code> attribute
>                      has the value
>     <code>IncompatibleConstraintsError</code>.</p>
>                      </p>
>
>                <p> TODO - need to add a failureCallback for this to do
>                    above. </p>
>
>                    </li-->
>
>     Both create situations where failures would need to be suppressed and
>     triggered on setXXXDescription.
>
>     I'm not really hard over on this issue, but what is clear to me is
>     that the usage model sucks if we defer errors.
>
>     If we intend to keep the "add to cart, checkout" model for addStream,
>     then we should consider removing constraints from that function.  A
>     simple add with deferred consequences is one thing, but having to deal
>     with constraint failures is going to generate significant pain.
>
>
> Yes - I already assumed we would relegate those constraints to the
> dustbin, preferring the use of doohickeys instead.

Yes, as we talked about in [1]. I'll try to get this edit done tomorrow.

/Adam

[1] http://lists.w3.org/Archives/Public/public-webrtc/2013Nov/0157.html

Received on Thursday, 16 January 2014 06:19:25 UTC