- From: Justin Uberti <juberti@google.com>
- Date: Fri, 15 Jun 2012 15:28:05 -0400
- To: public-webrtc@w3.org
- Message-ID: <CAOJ7v-2D4vCcbjUiTq0yZkd=2w0R8PP7EHuLenY-zkO=J+QOZw@mail.gmail.com>
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<http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-createOffer-void-SessionDescriptionCallback-successCallback-PeerConnectionErrorCallback-failureCallback-MediaConstraints-constraints>(SessionDescriptionCallback successCallback, optional PeerConnectionErrorCallback failureCallback, optional SessionDescriptionOptions options); void createAnswer<http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-createAnswer-void-SessionDescription-offer-SessionDescriptionCallback-successCallback-PeerConnectionErrorCallback-failureCallback-MediaConstraints-constraints-Boolean-createProvisionalAnswer-false>(SessionDescriptionCallback successCallback, optional PeerConnectionErrorCallback failureCallback, optional SessionDescriptionOptions options); ... void updateIce<http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-updateIce-void-IceServers-configuration-MediaConstraints-constraints-Boolean-restart-false>(optional IceServers<http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-IceServers>configuration, optional IceOptions options); Does this look reasonable? *
Received on Friday, 15 June 2012 19:28:54 UTC