|
@@ -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) {
|