Преглед изворни кода

fix: Send videoType bridge message for mute/unmute on FF. (#1642)

Set the initial video type state to NONE to cover cases when the endpoint joins video muted.
dev1
Jaya Allamsetty пре 4 година
родитељ
комит
24627e1b95
No account linked to committer's email address
3 измењених фајлова са 18 додато и 3 уклоњено
  1. 10
    2
      JitsiConference.js
  2. 7
    0
      modules/RTC/JitsiTrack.js
  3. 1
    1
      modules/RTC/RTC.js

+ 10
- 2
JitsiConference.js Прегледај датотеку

1044
         actorParticipant = this.participants[actorId];
1044
         actorParticipant = this.participants[actorId];
1045
     }
1045
     }
1046
 
1046
 
1047
+    // Send the video type message to the bridge if the track is not removed/added to the pc as part of
1048
+    // the mute/unmute operation. This currently happens only on Firefox.
1049
+    if (track.isVideoTrack() && !browser.doesVideoMuteByStreamRemove()) {
1050
+        const videoType = track.isMuted() ? VideoType.NONE : track.getVideoType();
1051
+
1052
+        this.rtc.setVideoType(videoType);
1053
+    }
1054
+
1047
     this.eventEmitter.emit(JitsiConferenceEvents.TRACK_MUTE_CHANGED, track, actorParticipant);
1055
     this.eventEmitter.emit(JitsiConferenceEvents.TRACK_MUTE_CHANGED, track, actorParticipant);
1048
 };
1056
 };
1049
 
1057
 
1127
             if (newTrack) {
1135
             if (newTrack) {
1128
                 // Now handle the addition of the newTrack at the JitsiConference level
1136
                 // Now handle the addition of the newTrack at the JitsiConference level
1129
                 this._setupNewTrack(newTrack);
1137
                 this._setupNewTrack(newTrack);
1130
-                newTrack.isVideoTrack() && this.rtc.setVideoType(newTrack.videoType);
1138
+                newTrack.isVideoTrack() && this.rtc.setVideoType(newTrack.getVideoType());
1131
             } else {
1139
             } else {
1132
                 oldTrack && oldTrack.isVideoTrack() && this.rtc.setVideoType(VideoType.NONE);
1140
                 oldTrack && oldTrack.isVideoTrack() && this.rtc.setVideoType(VideoType.NONE);
1133
             }
1141
             }
1251
     return Promise.allSettled(addAsUnmutePromises)
1259
     return Promise.allSettled(addAsUnmutePromises)
1252
         .then(() => {
1260
         .then(() => {
1253
             // Signal the video type to the bridge.
1261
             // Signal the video type to the bridge.
1254
-            track.isVideoTrack() && this.rtc.setVideoType(track.videoType);
1262
+            track.isVideoTrack() && this.rtc.setVideoType(track.getVideoType());
1255
         });
1263
         });
1256
 };
1264
 };
1257
 
1265
 

+ 7
- 0
modules/RTC/JitsiTrack.js Прегледај датотеку

174
         }
174
         }
175
     }
175
     }
176
 
176
 
177
+    /**
178
+     * Returns the video type (camera or desktop) of this track.
179
+     */
180
+    getVideoType() {
181
+        return this.videoType;
182
+    }
183
+
177
     /**
184
     /**
178
      * Returns the type (audio or video) of this track.
185
      * Returns the type (audio or video) of this track.
179
      */
186
      */

+ 1
- 1
modules/RTC/RTC.js Прегледај датотеку

152
             = this._updateAudioOutputForAudioTracks.bind(this);
152
             = this._updateAudioOutputForAudioTracks.bind(this);
153
 
153
 
154
         // The default video type assumed by the bridge.
154
         // The default video type assumed by the bridge.
155
-        this._videoType = VideoType.CAMERA;
155
+        this._videoType = VideoType.NONE;
156
 
156
 
157
         // Switch audio output device on all remote audio tracks. Local audio
157
         // Switch audio output device on all remote audio tracks. Local audio
158
         // tracks handle this event by themselves.
158
         // tracks handle this event by themselves.

Loading…
Откажи
Сачувај