Sfoglia il codice sorgente

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.
master
Leonard Kim 8 anni fa
parent
commit
a05ebdbbbc

+ 2
- 2
modules/RTC/LocalSdpMunger.js Vedi File

170
      * @returns {RTCSessionDescription}
170
      * @returns {RTCSessionDescription}
171
      */
171
      */
172
     maybeAddMutedLocalVideoTracksToSDP(desc) {
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
         const transformer = new SdpTransformWrap(desc.sdp);
177
         const transformer = new SdpTransformWrap(desc.sdp);

+ 2
- 3
modules/RTC/TraceablePeerConnection.js Vedi File

1076
  * @param {Object} localDescription the SDP object as defined by WebRTC.
1076
  * @param {Object} localDescription the SDP object as defined by WebRTC.
1077
  */
1077
  */
1078
 const enforceSendRecv = function(localDescription) {
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
     const transformer = new SdpTransformWrap(localDescription.sdp);
1083
     const transformer = new SdpTransformWrap(localDescription.sdp);

Loading…
Annulla
Salva