Pārlūkot izejas kodu

fix(JingleSessionPC): fix crash/remove unused arg

Fixes crashed when null stream (muted) is being removed.
dev1
paweldomas 9 gadus atpakaļ
vecāks
revīzija
479f97ceee

+ 7
- 5
modules/xmpp/JingleSessionPC.js Parādīt failu

@@ -1043,16 +1043,18 @@ JingleSessionPC.prototype._handleFirefoxRemoveStream = function (stream) {
1043 1043
  * NOTE: must be called within a work function being executed
1044 1044
  *  by the modification queue.
1045 1045
  */
1046
-JingleSessionPC.prototype.removeStreamFromPeerConnection = function (stream, stopStream) {
1047
-    let actualStream = stream && stream.getOriginalStream ? stream.getOriginalStream() : stream;
1046
+JingleSessionPC.prototype.removeStreamFromPeerConnection = function (stream) {
1047
+    let actualStream
1048
+        = stream && stream.getOriginalStream
1049
+            ? stream.getOriginalStream() : stream;
1048 1050
     if (!this.peerconnection) {
1049 1051
         return;
1050 1052
     }
1051 1053
     if (RTCBrowserType.getBrowserType() ===
1052 1054
             RTCBrowserType.RTC_BROWSER_FIREFOX) {
1053 1055
         this._handleFirefoxRemoveStream(actualStream);
1054
-    } else if (stream) {
1055
-        this.peerconnection.removeStream(actualStream, stopStream);
1056
+    } else if (actualStream) {
1057
+        this.peerconnection.removeStream(actualStream);
1056 1058
     }
1057 1059
 };
1058 1060
 
@@ -1075,7 +1077,7 @@ JingleSessionPC.prototype.removeStream = function (stream, callback, errorCallba
1075 1077
                 RTCBrowserType.RTC_BROWSER_FIREFOX) {
1076 1078
             this._handleFirefoxRemoveStream(stream);
1077 1079
         } else if (stream) {
1078
-            this.removeStreamFromPeerConnection(stream, false);
1080
+            this.removeStreamFromPeerConnection(stream);
1079 1081
         }
1080 1082
         let oldSdp = new SDP(this.peerconnection.localDescription.sdp);
1081 1083
         this._renegotiate()

+ 1
- 5
modules/xmpp/TraceablePeerConnection.js Parādīt failu

@@ -2,7 +2,6 @@
2 2
 
3 3
 import { getLogger } from "jitsi-meet-logger";
4 4
 const logger = getLogger(__filename);
5
-import RTC from '../RTC/RTC';
6 5
 import SdpConsistency from "./SdpConsistency.js";
7 6
 var RTCBrowserType = require("../RTC/RTCBrowserType.js");
8 7
 var XMPPEvents = require("../../service/xmpp/XMPPEvents");
@@ -322,11 +321,8 @@ TraceablePeerConnection.prototype.addStream = function (stream, ssrcInfo) {
322 321
     }
323 322
 };
324 323
 
325
-TraceablePeerConnection.prototype.removeStream = function (stream, stopStreams) {
324
+TraceablePeerConnection.prototype.removeStream = function (stream) {
326 325
     this.trace('removeStream', stream.id);
327
-    if (stopStreams) {
328
-        RTC.stopMediaStream(stream);
329
-    }
330 326
     // FF doesn't support this yet.
331 327
     if (this.peerconnection.removeStream) {
332 328
         this.peerconnection.removeStream(stream);

Notiek ielāde…
Atcelt
Saglabāt