Bug 1430213 - add toggle pref for RTCRtpReceiver RTP sources APIs;r?jib draft
authorNico Grunbaum
Fri, 12 Jan 2018 11:59:19 -0800
changeset 722799 ab7e2f4bea56278164042fcbdc7b5e7ddbd77e10
parent 722181 0a543687fd36bc0dc4188c3d33d117b0a8174721
child 746706 bee8d43e1a5a7301e6d4e16fe4ce4b1ef1bdb2e2
push id96257
push userna-g@nostrum.com
push dateSat, 20 Jan 2018 04:52:17 +0000
reviewersjib
bugs1430213
milestone59.0a1
Bug 1430213 - add toggle pref for RTCRtpReceiver RTP sources APIs;r?jib MozReview-Commit-ID: 7vKUDDpjiP2
dom/media/tests/mochitest/head.js
dom/webidl/RTCRtpReceiver.webidl
modules/libpref/init/all.js
--- a/dom/media/tests/mochitest/head.js
+++ b/dom/media/tests/mochitest/head.js
@@ -384,16 +384,17 @@ function setupEnvironment() {
   var defaultMochitestPrefs = {
     'set': [
       ['media.peerconnection.enabled', true],
       ['media.peerconnection.identity.enabled', true],
       ['media.peerconnection.identity.timeout', 120000],
       ['media.peerconnection.ice.stun_client_maximum_transmits', 14],
       ['media.peerconnection.ice.trickle_grace_period', 30000],
       ['media.peerconnection.remoteTrackId.enabled', true],
+      ['media.peerconnection.rtpsourcesapi.enabled', true],
       ['media.navigator.permission.disabled', true],
       ['media.navigator.streams.fake', FAKE_ENABLED],
       ['media.getusermedia.screensharing.enabled', true],
       ['media.getusermedia.audiocapture.enabled', true],
       ['media.recorder.audio_node.enabled', true]
     ]
   };
 
--- a/dom/webidl/RTCRtpReceiver.webidl
+++ b/dom/webidl/RTCRtpReceiver.webidl
@@ -7,17 +7,19 @@
  * http://lists.w3.org/Archives/Public/public-webrtc/2014May/0067.html
  */
 
 [Pref="media.peerconnection.enabled",
  JSImplementation="@mozilla.org/dom/rtpreceiver;1"]
 interface RTCRtpReceiver {
   readonly attribute MediaStreamTrack   track;
   Promise<RTCStatsReport>               getStats();
+  [Pref="media.peerconnection.rtpsourcesapi.enabled"]
   sequence<RTCRtpContributingSource>    getContributingSources();
+  [Pref="media.peerconnection.rtpsourcesapi.enabled"]
   sequence<RTCRtpSynchronizationSource> getSynchronizationSources();
 
   [ChromeOnly]
   void setStreamIds(sequence<DOMString> streamIds);
   [ChromeOnly]
   void setRemoteSendBit(boolean sendBit);
   [ChromeOnly]
   void processTrackAdditionsAndRemovals(
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -497,16 +497,17 @@ pref("media.peerconnection.ice.relay_onl
 pref("media.peerconnection.use_document_iceservers", true);
 pref("media.peerconnection.identity.enabled", true);
 pref("media.peerconnection.identity.timeout", 10000);
 pref("media.peerconnection.ice.stun_client_maximum_transmits", 7);
 pref("media.peerconnection.ice.trickle_grace_period", 5000);
 pref("media.peerconnection.ice.no_host", false);
 pref("media.peerconnection.ice.default_address_only", false);
 pref("media.peerconnection.ice.proxy_only", false);
+pref("media.peerconnection.rtpsourcesapi.enabled", true);
 
 // These values (aec, agc, and noise) are from media/webrtc/trunk/webrtc/common_types.h
 // kXxxUnchanged = 0, kXxxDefault = 1, and higher values are specific to each
 // setting (for Xxx = Ec, Agc, or Ns).  Defaults are all set to kXxxDefault here.
 pref("media.peerconnection.turn.disable", false);
 #if defined(MOZ_WEBRTC_HARDWARE_AEC_NS)
 pref("media.getusermedia.aec_enabled", false);
 pref("media.getusermedia.noise_enabled", false);