[jitsi-dev] need help in lib-jitsi-meet


#1

Hi everyone,

I was trying to understand the codebase of lib-jitsi-meet but didn't get
much. I got some basic details from api.md doc but I want to go in deep as
I want to customize some methods, so that I can send data(json) from client
side to everyone who is connected in a conference(other than chat messages)
and want to understand the whole flow of this.
Can anybody help me with this or provide me some good pointers to start
with?

Thanks,
Prashant


#2

Maybe you could use

···

On Wed, Mar 21, 2018 at 7:41 PM, Prashant Jain <prashantjain.pro@gmail.com> wrote:

Hi everyone,

I was trying to understand the codebase of lib-jitsi-meet but didn't get
much. I got some basic details from api.md doc but I want to go in deep
as I want to customize some methods, so that I can send data(json) from
client side to everyone who is connected in a conference(other than chat
messages) and want to understand the whole flow of this.
Can anybody help me with this or provide me some good pointers to start
with?

Thanks,
Prashant

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#3

Hi Prashant,

Maybe you could use XMPPEvents.JSON_MESSAGE_RECEIVED. Have a look at the
files from my PR [1] from previous year, which deals with communication in
JSON messages.

Kind regards,

Nik

[1] = https://github.com/jitsi/lib-jitsi-meet/pull/575

p.s accidentally pressed a keyboard shortcut to send the other email
prematurely

···

On Wed, Mar 21, 2018 at 8:07 PM, Nik V <nikvaes@gmail.com> wrote:

Maybe you could use

On Wed, Mar 21, 2018 at 7:41 PM, Prashant Jain <prashantjain.pro@gmail.com > > wrote:

Hi everyone,

I was trying to understand the codebase of lib-jitsi-meet but didn't get
much. I got some basic details from api.md doc but I want to go in deep
as I want to customize some methods, so that I can send data(json) from
client side to everyone who is connected in a conference(other than chat
messages) and want to understand the whole flow of this.
Can anybody help me with this or provide me some good pointers to start
with?

Thanks,
Prashant

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#4

Hi Nik,

Thanks for your last reply.

My exact problem is, I want to send some data (json) from client to
everyone who is connected to a conference and I want that this data should
not appear directly to others(like chat), rather it should be saved in the
local storage or cookie of connected clients for some time, so that later
when users will click on a button, I will get that available from the local
storage and show it to clients.

Well, I've done such things before with use of socket.io, but I am not
fully aware of codebase of lib-jitsi-meet and that's why I didn't
understand from where to start.

Will you please help me with this??

Thanks,
Prashant :slight_smile:

Let's keep the discussion on the mailing list.

I'm not the most familiar with Jitsi Meet's signalling, but I will try to
explain to the best of my knowledge.

Jitsi Meet uses XMPP to communicate with others. What I implemented in the
PR I linked to is that I use the chat (which uses a specific element in the
XML of the XMPP signal for the chatroom, just as other data like would be
in other XML elements) to send JSON to the other participants. But instead
of showing the JSON in the chat, we first check if the message is actually
JSON instead of plaintext, and when this is the case a XMPPEvents.
JSON_MESSAGE_RECEIVED is fired instead of
XMPPEvents.MESSAGE_RECEIVED. The chatroom listens for these events, and
fires a JitsiConferenceEvents.ENDPOINT_MESSAGE_RECEIVED whenever a JSON
message is sent via the chatroom. We can than listen for these JSON
messages in Jitsi Meet by adding a callback listener for the
ENDPOINT_MESSAGE_RECEIVED events like I did here [1]. You can than do
whatever you want with the content of the JSON, like storing it in local
storage.

[1] = https://github.com/nikvaessen/jitsi-meet/blob/
ed20f379a89002afb33cbf6ad1279a4b51f89a46/react/features/
transcription/components/TranscriptionSubtitles.web.js#L237


#5

I actually have a branch which exposes this (the sending part) in a more friendly manner.
https://github.com/jitsi/lib-jitsi-meet/pull/723

Regards,
Boris

···

On 22/03/2018 00:54, Nik V wrote:

    Hi Nik,

    Thanks for your last reply.

    My exact problem is, I want to send some data (json) from client to
    everyone who is connected to a conference and I want that this data
    should not appear directly to others(like chat), rather it should be
    saved in the local storage or cookie of connected clients for some
    time, so that later when users will click on a button, I will get
    that available from the local storage and show it to clients.

    Well, I've done such things before with use of socket.io
    <http://socket.io>, but I am not fully aware of codebase of
    lib-jitsi-meet and that's why I didn't understand from where to start.

    Will you please help me with this??

    Thanks,
    Prashant :slight_smile:

Let's keep the discussion on the mailing list.

I'm not the most familiar with Jitsi Meet's signalling, but I will try to explain to the best of my knowledge.

Jitsi Meet uses XMPP to communicate with others. What I implemented in the PR I linked to is that I use the chat (which uses a specific element in the XML of the XMPP signal for the chatroom, just as other data like would be in other XML elements) to send JSON to the other participants. But instead of showing the JSON in the chat, we first check if the message is actually JSON instead of plaintext, and when this is the case a XMPPEvents.JSON_MESSAGE_RECEIVED is fired instead of
XMPPEvents.MESSAGE_RECEIVED. The chatroom listens for these events, and fires a JitsiConferenceEvents.ENDPOINT_MESSAGE_RECEIVED whenever a JSON message is sent via the chatroom. We can than listen for these JSON messages in Jitsi Meet by adding a callback listener for the ENDPOINT_MESSAGE_RECEIVED events like I did here [1]. You can than do whatever you want with the content of the JSON, like storing it in local storage.

[1] = https://github.com/nikvaessen/jitsi-meet/blob/ed20f379a89002afb33cbf6ad1279a4b51f89a46/react/features/transcription/components/TranscriptionSubtitles.web.js#L237

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev