Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Disable one&one when user is in conference
Browse files Browse the repository at this point in the history
  • Loading branch information
alimtunc committed Jul 5, 2023
1 parent 5882aa9 commit 478609b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/client/user-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 6 additions & 0 deletions core/modules/meet/client/meet-low-level.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,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))
Expand Down

0 comments on commit 478609b

Please sign in to comment.