|
@@ -1293,11 +1293,9 @@ JitsiConference.prototype.replaceTrack = function(oldTrack, newTrack) {
|
1293
|
1293
|
this._sendBridgeVideoTypeMessage(newTrack);
|
1294
|
1294
|
}
|
1295
|
1295
|
|
1296
|
|
- // updates presence when we replace the video tracks desktop with screen and screen with desktop
|
1297
|
|
- if (oldTrackBelongsToConference && oldTrack?.isVideoTrack()
|
1298
|
|
-
|
1299
|
|
- // we do not want to send presence update during setEffect switching, which does remove and then add
|
1300
|
|
- && !(oldTrack?._setEffectInProgress || newTrack?._setEffectInProgress)) {
|
|
1296
|
+ // We do not want to send presence update during setEffect switching, which removes and then adds the same
|
|
1297
|
+ // track back to the conference.
|
|
1298
|
+ if (!(oldTrack?._setEffectInProgress || newTrack?._setEffectInProgress)) {
|
1301
|
1299
|
this._updateRoomPresence(this.getActiveMediaSession());
|
1302
|
1300
|
}
|
1303
|
1301
|
|
|
@@ -3649,9 +3647,9 @@ JitsiConference.prototype._updateRoomPresence = function(jingleSession, ctx) {
|
3649
|
3647
|
|
3650
|
3648
|
let presenceChanged = false;
|
3651
|
3649
|
let muteStatusChanged, videoTypeChanged;
|
3652
|
|
- const localTracks = this.getLocalTracks();
|
3653
|
|
- const localAudioTracks = jingleSession.peerconnection.getLocalTracks(MediaType.AUDIO);
|
3654
|
|
- const localVideoTracks = jingleSession.peerconnection.getLocalTracks(MediaType.VIDEO);
|
|
3650
|
+ const localTracks = jingleSession.peerconnection.getLocalTracks();
|
|
3651
|
+ const localAudioTracks = localTracks.filter(track => track.getType() === MediaType.AUDIO);
|
|
3652
|
+ const localVideoTracks = localTracks.filter(track => track.getType() === MediaType.VIDEO);
|
3655
|
3653
|
|
3656
|
3654
|
// Set presence for all the available local tracks.
|
3657
|
3655
|
for (const track of localTracks) {
|