Bug 1363667 - P1 - Add Contrib/Sync sources webidl;r?jib draft
authorNico Grunbaum
Mon, 14 Aug 2017 16:13:00 -0700
changeset 675246 00a6cb94ad70d28b101f3dd5b73af7d47d200d0f
parent 675194 c3b7759671deae73e40ebca01d7f23a326a4b8c2
child 675247 a8b23ecfe8a3370f8b334071bc449c8afec8d561
push id83079
push userna-g@nostrum.com
push dateThu, 05 Oct 2017 02:18:41 +0000
reviewersjib
bugs1363667
milestone58.0a1
Bug 1363667 - P1 - Add Contrib/Sync sources webidl;r?jib MozReview-Commit-ID: 5qIWYb1OoSx
dom/webidl/RTCRtpContributingSource.webidl
dom/webidl/RTCRtpReceiver.webidl
dom/webidl/RTCRtpSynchronizationSource.webidl
dom/webidl/moz.build
new file mode 100644
--- /dev/null
+++ b/dom/webidl/RTCRtpContributingSource.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/webrtc-pc/archives/20170605/webrtc.html
+ */
+
+[Pref="media.peerconnection.enabled",
+    JSImplementation="@mozilla.org/dom/rtpcontributingsource;1"]
+interface RTCRtpContributingSource {
+    readonly attribute DOMHighResTimeStamp timestamp;
+    readonly attribute unsigned long       source;
+    readonly attribute byte?               audioLevel;
+};
\ No newline at end of file
--- a/dom/webidl/RTCRtpReceiver.webidl
+++ b/dom/webidl/RTCRtpReceiver.webidl
@@ -5,11 +5,13 @@
  *
  * The origin of this IDL file is
  * 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();
+  readonly attribute MediaStreamTrack   track;
+  Promise<RTCStatsReport>               getStats();
+  sequence<RTCRtpContributingSource>    getContributingSources();
+  sequence<RTCRtpSynchronizationSource> getSynchronizationSources();
 };
new file mode 100644
--- /dev/null
+++ b/dom/webidl/RTCRtpSynchronizationSource.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/webrtc-pc/archives/20170605/webrtc.html
+ */
+
+[Pref="media.peerconnection.enabled",
+    JSImplementation="@mozilla.org/dom/rtpsynchronizationsource;1"]
+interface RTCRtpSynchronizationSource {
+    readonly attribute DOMHighResTimeStamp timestamp;
+    readonly attribute unsigned long       source;
+    readonly attribute byte                audioLevel;
+};
\ No newline at end of file
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -1005,18 +1005,20 @@ if CONFIG['MOZ_WEBRTC']:
         'RTCCertificate.webidl',
         'RTCConfiguration.webidl',
         'RTCDTMFSender.webidl',
         'RTCIceCandidate.webidl',
         'RTCIdentityAssertion.webidl',
         'RTCIdentityProvider.webidl',
         'RTCPeerConnection.webidl',
         'RTCPeerConnectionStatic.webidl',
+        'RTCRtpContributingSource.webidl',
         'RTCRtpReceiver.webidl',
         'RTCRtpSender.webidl',
+        'RTCRtpSynchronizationSource.webidl',
         'RTCSessionDescription.webidl',
         'WebrtcDeprecated.webidl',
         'WebrtcGlobalInformation.webidl',
     ]
 
 if CONFIG['MOZ_WEBSPEECH']:
     WEBIDL_FILES += [
         'SpeechGrammar.webidl',