Bläddra i källkod

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

dev1
Jaya Allamsetty 3 år sedan
förälder
incheckning
8a95fda259
1 ändrade filer med 5 tillägg och 1 borttagningar
  1. 5
    1
      JitsiConference.js

+ 5
- 1
JitsiConference.js Visa fil

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

Laddar…
Avbryt
Spara