W3C home > Mailing lists > Public > public-webrtc@w3.org > June 2012

Re: Spec question: Using settings dictionaries instead of MediaConstraints ([ACTION-50])

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Mon, 18 Jun 2012 14:13:44 +0200
Message-ID: <4FDF1B78.9020703@ericsson.com>
To: Justin Uberti <juberti@google.com>
CC: "public-webrtc@w3.org" <public-webrtc@w3.org>
On 2012-06-15 21:28, Justin Uberti wrote:
> At the interim, it was indicated that using MediaConstraints for
> non-media PeerConnection methods was probably not the right fit, one
> reason being that most options were only relevant for a specific method,
> and it would be good to make it clear which options should be passed to
> which methods.
>
> Therefore I propose that we define other settings dictionaries, similar
> to MediaConstraints, but named specifically for the methods in which
> they will be used.
>
> This results in new dictionaries IceOptions and
> SessionDescriptionOptions, with values as shown below:
>
> IceOptions.AllowedCandidates = ("none", "relay", "all) // "all", if not
> specified
>
> SessionDescriptionOptions.IncludeAudio = true/false // forces m=audio
> line to be included
> SessionDescriptionOptions.IncludeVideo = true/false // forces m=video
> line to be included
> SessionDescriptionOptions.UseVoiceActivityDetection = true/false //
> includes CN codecs if true
> SessionDescriptionOptions.RestartIce = true/false // generates offer
> with new ufrag/pwd
> SessionDescriptionOptions.GetCapabilities = true/false // generates
> "capabilities" offer
>
> These fit into the existing API on the createOffer/Answer and updateIce
> methods:
>
> *
>
> [Constructor (IceServers configuration, optional IceOptions iceOptions)]
> interface PeerConnection {
>     void createOffer(SessionDescriptionCallback
> successCallback, optional PeerConnectionErrorCallback failureCallback,
> optional SessionDescriptionOptions options);
>     void createAnswer(SessionDescriptionCallback
> successCallback, optional PeerConnectionErrorCallback failureCallback,
> optional SessionDescriptionOptions options);
>    ...
>
>     void updateIce(optionalIceServersconfiguration,
> optional IceOptions options);
>
>
> Does this look reasonable?

This is pretty much how I pictured it when we talked about it at the 
meeting.

A question regarding includeAudio/Video: If I add a MediaStream with 
both audio and video on both sides I don't have to specify these, right?

/Adam
Received on Monday, 18 June 2012 12:14:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:28 UTC