From ac5ec13cc924e1e56a61837633000f0928cdcfdc Mon Sep 17 00:00:00 2001 From: Daniel Neto Date: Tue, 10 Dec 2024 11:59:15 -0300 Subject: [PATCH] Update --- plugin/Meet/api.js.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/plugin/Meet/api.js.php b/plugin/Meet/api.js.php index 117860940316..122f2b899e15 100644 --- a/plugin/Meet/api.js.php +++ b/plugin/Meet/api.js.php @@ -169,10 +169,19 @@ interfaceConfigOverwrite: { readyToClose: readyToClose, }); + let myUserID; + + // Listen for when the local participant joins the conference + api.addListener('videoConferenceJoined', (event) => { + console.log('videoConferenceJoined', event); + myUserID = event.id; // Save the local participant's ID + }); + + // Listen for participants joining the conference api.addListener('participantJoined', (participant) => { - console.log('participantJoined', participant, api._myUserID); + console.log('participantJoined', participant, myUserID); // Check if the participant is the local participant - if (participant.id === api._myUserID) { + if (participant.id === myUserID) { console.log('participantJoined will change'); let currentName = participant.displayName || "";