From a43dfb419a8d8300f36c5db67a390a63dd01e1b5 Mon Sep 17 00:00:00 2001 From: Alim TUNC Date: Tue, 4 Jul 2023 17:24:34 +0200 Subject: [PATCH] Disable one&one when user is in conference --- core/client/user-manager.js | 2 +- core/modules/meet/client/meet-low-level.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/client/user-manager.js b/core/client/user-manager.js index fe4d59af..44a453de 100644 --- a/core/client/user-manager.js +++ b/core/client/user-manager.js @@ -272,7 +272,7 @@ userManager = { const nearUsersCount = guestAllowed(permissionTypes.talkToUsers) ? userProximitySensor.nearUsersCount() : userProximitySensor.nearNonGuestUsers().length - this.controlledCharacter.enableChatCircle(nearUsersCount > 0) + this.controlledCharacter.enableChatCircle(!Session.get('isJitsiMeetOpen') && nearUsersCount > 0) } else this.controlledCharacter.enableChatCircle(false) const newVelocity = this.controlledCharacter.physicsStep() diff --git a/core/modules/meet/client/meet-low-level.js b/core/modules/meet/client/meet-low-level.js index 62176548..9e1871b1 100644 --- a/core/modules/meet/client/meet-low-level.js +++ b/core/modules/meet/client/meet-low-level.js @@ -54,6 +54,12 @@ Template.meetLowLevel.onCreated(function () { .catch((err) => console.error('An error occured while creating local tracks', err)) }) + this.autorun(() => { + if (this.connection.get() && Session.get('isJitsiMeetOpen')) { + meetLowLevel.disconnect() + } + }) + window.addEventListener(eventTypes.onUsersComeCloser, (e) => onUsersComeCloser(e, this)) window.addEventListener(eventTypes.onUsersMovedAway, (e) => onUsersMovedAway(e, this)) window.addEventListener(eventTypes.onUserPropertyUpdated, (e) => onUserPropertyUpdated(e, this))