Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Dec 10, 2024
1 parent ad654d7 commit ac5ec13
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions plugin/Meet/api.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 || "";

Expand Down

0 comments on commit ac5ec13

Please sign in to comment.