Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/webrtc.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/js/webrtc.js b/js/webrtc.js
index 217f9d1f0..550050769 100644
--- a/js/webrtc.js
+++ b/js/webrtc.js
@@ -1223,15 +1223,17 @@ var spreedPeerConnectionTable = [];
var signaling = OCA.SpreedMe.app.signaling;
var currentSessionId = signaling.getSessionid();
- OCA.SpreedMe.webrtc.getPeers(null, 'video').forEach(function (existingPeer) {
- if (existingPeer.id === currentSessionId) {
+ for (var sessionId in usersInCallMapping) {
+ if (!usersInCallMapping.hasOwnProperty(sessionId)) {
+ continue;
+ } else if (sessionId === currentSessionId) {
// Running with MCU, no need to create screensharing
// subscriber for client itself.
- return;
+ continue;
}
- createScreensharingPeer(signaling, existingPeer.id);
- });
+ createScreensharingPeer(signaling, sessionId);
+ }
});
OCA.SpreedMe.webrtc.on('localScreenStopped', function() {