Skip to content

Commit

Permalink
Merge pull request #2006 from nextcloud/backport/2004/stable16
Browse files Browse the repository at this point in the history
[stable16] Fix peer creation for participants no longer in the call
  • Loading branch information
nickvergessen authored Jul 19, 2019
2 parents 16d74db + 12c1096 commit 3c97830
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ var spreedPeerConnectionTable = [];
OCA.SpreedMe.videos.remove(sessionId);
delete spreedMappingTable[sessionId];
delete guestNamesTable[sessionId];
if (delayedCreatePeer[sessionId]) {
clearTimeout(delayedCreatePeer[sessionId]);
delete delayedCreatePeer[sessionId];
}
});

previousUsersInRoom = previousUsersInRoom.diff(disconnectedSessionIds);
Expand Down Expand Up @@ -349,6 +353,12 @@ var spreedPeerConnectionTable = [];
delete delayedCreatePeer[message.from];
}

if (!selfInCall) {
console.log('Offer received when not in the call, ignore');

message.type = 'offer-to-ignore';
}

// MCU screen offers do not include the "broadcaster" property,
// which is expected by SimpleWebRTC in screen offers from a remote
// peer, so it needs to be explicitly added.
Expand Down

0 comments on commit 3c97830

Please sign in to comment.