Call record function from my button

Hi, I ask for help, please!
We have Jitsi application configured on the server, Jibri configured, everything works great.

We want to move the video button from the hidden menu to the main screen. I added my button and wanted to click on the Videos item in the menu when clicking on it. But the menu doesn’t exist until you click on its icon …

Now I want to call the record function on click of my button. I found that the recording function is called like this JitsiConference.startRecording (options). I’m trying to do it, but honestly, I can’t figure it out.

Can you please tell me how to call the recording function by clicking on my button?

In fact, I need to initiate a click on the button that is in the menu …

Any help would be appreciated!

this code:
$(’.start-rec-cust’).click(function(){
JitsiConference.startRecording();
})

gives this result:

JitsiConference is not defined

i could connect this file:


and try to create a new object…

But even if it worked, I think it’s a tough crutch. Because now everything works when you click on a regular button

I cannot solve this problem. If anyone can tell me it would be great…