소스 검색

fix(presence): Do not sent presence if there is no active media session.

dev1
Jaya Allamsetty 3 년 전
부모
커밋
8a95fda259
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5
    1
      JitsiConference.js

+ 5
- 1
JitsiConference.js 파일 보기

@@ -1266,7 +1266,7 @@ JitsiConference.prototype.replaceTrack = function(oldTrack, newTrack) {
1266 1266
 
1267 1267
             // updates presence when we replace the video tracks desktop with screen and screen with desktop
1268 1268
             if (oldTrackBelongsToConference && oldTrack?.isVideoTrack()) {
1269
-                this._updateRoomPresence(this.p2pJingleSession ? this.p2pJingleSession : this.jvbJingleSession);
1269
+                this._updateRoomPresence(this._getActiveMediaSession());
1270 1270
             }
1271 1271
 
1272 1272
             if (newTrack !== null && (this.isMutedByFocus || this.isVideoMutedByFocus)) {
@@ -3630,6 +3630,10 @@ JitsiConference.prototype._stopP2PSession = function(options = {}) {
3630 3630
  * @param {Object|null} ctx a context object we can distinguish multiple calls of the same pass of updating tracks.
3631 3631
  */
3632 3632
 JitsiConference.prototype._updateRoomPresence = function(jingleSession, ctx) {
3633
+    if (!jingleSession) {
3634
+        return;
3635
+    }
3636
+
3633 3637
     // skips sending presence twice for the same pass of updating ssrcs
3634 3638
     if (ctx) {
3635 3639
         if (ctx.skip) {

Loading…
취소
저장