Procházet zdrojové kódy

fix(ie11): do not type check for RTCSessionDescription

Error handling was added to ensure some munging helpers
were receiving RTCSessionDescriptions. Temasys is doing
something else and is passing its own object into
the mungers. So, let temasys do that.
tags/v0.0.2
Leonard Kim před 8 roky
rodič
revize
a05ebdbbbc

+ 2
- 2
modules/RTC/LocalSdpMunger.js Zobrazit soubor

@@ -170,8 +170,8 @@ export default class LocalSdpMunger {
170 170
      * @returns {RTCSessionDescription}
171 171
      */
172 172
     maybeAddMutedLocalVideoTracksToSDP(desc) {
173
-        if (!desc || !(desc instanceof RTCSessionDescription)) {
174
-            throw new Error('Incorrect type, expected RTCSessionDescription');
173
+        if (!desc) {
174
+            throw new Error('No local description passed in.');
175 175
         }
176 176
 
177 177
         const transformer = new SdpTransformWrap(desc.sdp);

+ 2
- 3
modules/RTC/TraceablePeerConnection.js Zobrazit soubor

@@ -1076,9 +1076,8 @@ const normalizePlanB = function(desc) {
1076 1076
  * @param {Object} localDescription the SDP object as defined by WebRTC.
1077 1077
  */
1078 1078
 const enforceSendRecv = function(localDescription) {
1079
-    if (!localDescription
1080
-        || !(localDescription instanceof RTCSessionDescription)) {
1081
-        throw new Error('Incorrect type, expected RTCSessionDescription');
1079
+    if (!localDescription) {
1080
+        throw new Error('No local description passed in.');
1082 1081
     }
1083 1082
 
1084 1083
     const transformer = new SdpTransformWrap(localDescription.sdp);

Načítá se…
Zrušit
Uložit