calvinckho / capacitor-jitsi-meet

This plugin is used to make video calls using Jitsi video platform (https://meet.jit.si) on iOS and Android using Ionic Capacitor.
84 stars 40 forks source link

How can I listen to broadcasted events like chatMessageReceived? #116

Open nicolas-lescop opened 1 month ago

nicolas-lescop commented 1 month ago

Hi @calvinckho,

First of all, I would like to say "thanks!" for this amazing plugin.

In my Ionic app, I need to synchronize the Jitsi chat with my own chat. I have tried the web version to listen to this event: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-iframe-events/#outgoingmessage

For iOS and Android SDKs, I need to listen to these kinds of events: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-android-sdk/#chat_message_received https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-ios-sdk/#chatmessagereceived

I'm a web developer and don't know how to listen to these kinds of events. Can you help me implement this?

Thanks a lot!

calvinckho commented 1 month ago

Hi @nicolas-lescop, the plugin's event listener currently does not listen to the #chat_message_received event. Your suggestion is feasible, but it is fairly time consuming to implement as our current event listener is not designed to return data object. You can either try to tinker with it yourself, or wait for other contributors to respond and see if any of them also needs it and can add this feature for you. If no one can help you, you can DM me and I can offer my consultation service to help you modify the plugin.

nicolas-lescop commented 1 month ago

Hi @calvinckho

I try to implement it by himself, I can listen to the event and return data object.

Could you help me a little and tell me if there is a way to get the current user's Id participant? Because I find the participantId when I receive a message called senderId, but I can't easily know who the message belongs to.

Thanks

calvinckho commented 1 month ago

unfortunately I do not know how to find the user's Id participant. You may want to ask in the jitsi-meet github page or on other forums.