How to create custom event to send data to server?

Hi! I’m new to jitsi. I want to send data when button clicks. I have hosted my own server.

1 Like

Welcome to Jitsi @Doston_Oripjonov

I’m fairly new to React so I included a custom JS script to do the same. But this is the best what I did so far:
Follow the steps:

  1. Add the specific button (if you want to add a new button) using React UI.
  2. Add the onclick function on the button.
  3. Add an id to the button(class would be fine as long as it unique).
  4. Include a custom JS in the index.html file which is inside the jits-meet folder.
  5. Add an event listener to the specific id you have added.
  6. The JS function will be triggered on an onclick event.
  7. You can write your own logic for serving the host server.

Hope this helps.

Happy Coding!!

Hi @mudass1r , I am also working on a proect in React. Can I use these custom buttons to fire an event and send data to my own DB. For example, if I have an end call button which fires an event to get UserID from my Database(MongoDB) ?


Welcome to the community.

We you can do that. Also if you are using React for initiating Jitsi. I recommend you look at the below source code.

Let me know if you have a specific problem.

@mudass1r Thank you for the quick response, I will look into that. Another question, can I connect jitsi to my database somehow ?

You can.

I achievied it by using react request to make Rest API call to my Lambda which handled the MongoDB operations.

You can try that.

Okay, thank you so much !

Hello, I’m creating a meeting app using Kotlin. How can I create a new button or add new onClick function on an existed button?
For example, I want to navigate chat’s onClick to my own fragment so I can retrieve chat history on my own serve.
Thanks in advance!

1 Like

Sorry for the delay. Being away from community for a while.

To answer your question I guess you have to deep dive into the Chat functionality for this. Checkout the Chat module and install the lib-jitsi-meet in your instance to understand the flow of the Chat trigger.

Let me know if helps.

Happy Coding!

1 Like

Thank you for your help. I will try it for now.