Bug 1271669 - Deprecate RTCPeerConnection.getLocalStreams/getRemoteStreams. r?jib, r?smaug draft
authorAndreas Pehrson <pehrsons@gmail.com>
Fri, 20 May 2016 10:42:48 +0200
changeset 369112 dd05e5eb2deadddced212a76e19a469c3255dc14
parent 369111 87e56ca8e5dae76ad76ece6d1d9334c04c37d6cb
child 521464 1d0e67e7679a83a7ae8e1ab008b7febdb9f4d1ef
push id18740
push userpehrsons@gmail.com
push dateFri, 20 May 2016 08:44:08 +0000
reviewersjib, smaug
Bug 1271669 - Deprecate RTCPeerConnection.getLocalStreams/getRemoteStreams. r?jib, r?smaug getLocalStreams and getRemoteStreams have been removed from the spec. Also, getLocalStreams becomes a problem now that addTrack takes any MediaStream as the container for the added track. The addTrack()'ed MediaStream (perhaps not containing the track sent over the pc - perhaps containing other tracks not sent over the pc!) will be returned from getLocalStreams. MozReview-Commit-ID: JUVCUM32mPR
--- a/dom/base/nsDeprecatedOperationList.h
+++ b/dom/base/nsDeprecatedOperationList.h
@@ -37,11 +37,12 @@ DEPRECATED_OPERATION(ShowModalDialog)
--- a/dom/locales/en-US/chrome/dom/dom.properties
+++ b/dom/locales/en-US/chrome/dom/dom.properties
@@ -179,16 +179,18 @@ HittingMaxWorkersPerDomain2=A Worker cou
 # LOCALIZATION NOTE: Do not translate "setVelocity", "PannerNode", "AudioListener", "speedOfSound" and "dopplerFactor"
 PannerNodeDopplerWarning=Use of setVelocity on the PannerNode and AudioListener, and speedOfSound and dopplerFactor on the AudioListener are deprecated and those members will be removed. For more help https://developer.mozilla.org/en-US/docs/Web/API/AudioListener#Deprecated_features
 # LOCALIZATION NOTE: Do not translate "Application Cache API", "AppCache" and "ServiceWorker".
 AppCacheWarning=The Application Cache API (AppCache) is deprecated and will be removed at a future date.  Please consider using ServiceWorker for offline support.
 # LOCALIZATION NOTE: Do not translate "Worker".
 EmptyWorkerSourceWarning=Attempting to create a Worker from an empty source. This is probably unintentional.
 WebrtcDeprecatedPrefixWarning=WebRTC interfaces with the “moz” prefix (mozRTCPeerConnection, mozRTCSessionDescription, mozRTCIceCandidate) have been deprecated.
 NavigatorGetUserMediaWarning=navigator.mozGetUserMedia has been replaced by navigator.mediaDevices.getUserMedia
+# LOCALIZATION NOTE: Do not translate "RTCPeerConnection", "getLocalStreams", "getRemoteStreams", "getSenders" or "getReceivers".
+RTCPeerConnectionGetStreamsWarning=RTCPeerConnection.getLocalStreams/getRemoteStreams are deprecated. Use RTCPeerConnection.getSenders/getReceivers instead.
 # LOCALIZATION NOTE: Do not translate "ServiceWorker". %S is a URL.
 InterceptionFailedWithURL=Failed to load ‘%S’. A ServiceWorker intercepted the request and encountered an unexpected error.
 # LOCALIZATION NOTE: Do not translate "ServiceWorker", "FetchEvent.respondWith()", "FetchEvent", "no-cors", "opaque", "Response", or "RequestMode". %1$S is a URL. %2$S is a RequestMode value.
 BadOpaqueInterceptionRequestModeWithURL=Failed to load ‘%1$S’. A ServiceWorker passed an opaque Response to FetchEvent.respondWith() while handling a ‘%2$S’ FetchEvent. Opaque Response objects are only valid when the RequestMode is ‘no-cors’.
 # LOCALIZATION NOTE: Do not translate "ServiceWorker", "Error", "Response", "FetchEvent.respondWith()", or "fetch()". %S is a URL.
 InterceptedErrorResponseWithURL=Failed to load ‘%S’. A ServiceWorker passed an Error Response to FetchEvent.respondWith(). This typically means the ServiceWorker performed an invalid fetch() call.
 # LOCALIZATION NOTE: Do not translate "ServiceWorker", "Response", "FetchEvent.respondWith()", or "Response.clone()". %S is a URL.
 InterceptedUsedResponseWithURL=Failed to load ‘%S’. A ServiceWorker passed a used Response to FetchEvent.respondWith(). The body of a Response may only be read once. Use Response.clone() to access the body multiple times.
--- a/dom/webidl/RTCPeerConnection.webidl
+++ b/dom/webidl/RTCPeerConnection.webidl
@@ -111,19 +111,19 @@ interface RTCPeerConnection : EventTarge
   readonly attribute Promise<RTCIdentityAssertion> peerIdentity;
   readonly attribute DOMString? idpLoginUrl;
   attribute DOMString id;
   RTCConfiguration      getConfiguration ();
-  [UnsafeInPrerendering]
+  [UnsafeInPrerendering, Deprecated="RTCPeerConnectionGetStreams"]
   sequence<MediaStream> getLocalStreams ();
-  [UnsafeInPrerendering]
+  [UnsafeInPrerendering, Deprecated="RTCPeerConnectionGetStreams"]
   sequence<MediaStream> getRemoteStreams ();
   MediaStream? getStreamById (DOMString streamId);
   void addStream (MediaStream stream);
   void removeStream (MediaStream stream);
   // replaces addStream; fails if already added
   // because a track can be part of multiple streams, stream parameters