Get selected participant id to outside of IFrame

I want to add an api command that occurs whenever when someone clicks a button
like one of these and is able to return the participant id of the remotevideomenu where the button was clicked from

in other words I want to do

api.executeCommand('newCommandThatGetParticipantId', function (ParticipantId) {
    //insert code to use with ParticipantId

is there existing functions I can use to accomplish this or do I have to start from the ground up, if the latter where should I start from?

What button exactly?

in this case it would be the 'Make this participant the focus button which I added myself

So when a participant is pinned? I think this would work: Events | Jitsi Meet

upon further consideration of the type of feature I want to implement I realized I should ask for something different. Basically with the same button I mentioned earlier (‘Make this participant the focus’) I want to emit an event to all other participants in the meeting to set their pinned participant to the one I pinned. What is the best way to create such an event?

Sounds like you’re trying to reimplement the “Everyone follows me” feature :face_with_raised_eyebrow:


You can try that out in Once a moderator sets “Everyone follows me”, everyone in the room will see the same pinned participant or tile view as chosen by the moderator.

1 Like

… I feel really dumb right now that I never noticed this feature

:grin: Don’t feel bad. I admit it took me a long time before I discovered that feature too.

1 Like

now that I know this feature does exist I have been trying to move the function to the video-menu of each participant and currently unsuccessful, mainly the onchange function I could not wrap my head around how that is defined

_onFollowMeEnabledChanged: (Object) => void;

     * Callback invoked to select if follow-me mode
     * should be activated.
     * @param {Object} e - The key event to handle.
     * @returns {void}
    _onFollowMeEnabledChanged({ target: { checked } }) {
        super._onChange({ followMeEnabled: checked });

this is from jitsi-meet/react/features/settings/components/web/ModeratorTab.js

Why do you want to put it there?
This is enabled by one participant, enabling it on multiple participants may produce unexpected results.