Direct Chat
Supports Pexip Infinity V31 and later
Allows to send direct chat messages to a specific participant. The messages will only be received by the selected participant. Other participants do not get the messages. A direct messages conversation is indicated by an envelope icon next to the display names in the participant list. New messages are indicated by a green envelope. A chat window can be opened through the participant context menu in the participant list. Each participant is associated with a separate chat window. It is possible to open multiple chat windows at the same time. The chat window title contains the receiving participant name.
Goal
Support "direct chat“ via webapp2 plugin
Features:
- Chat window for sending and receiving direct messages
- Entry in participant context menu in participant list to open chat window
- Message indicator in participant list
Solution
Added participant uuid to dom tree (participant entries) to set the message indicator depending on sender uuid.
The plugin uses the Pexip Infinity direct message API:
api/client/v2/conferences/test.direct.chat/participants/{UUD}/message
Payload example -> {"type":"text/plain","payload":"Some Payload"}
Used library JSFrame (MIT License)
Limitations
- Group chats are not supported
- Does not scale properly on mobile and small window sizes
How to load this plugin
To load this plugin, download the source code from the Github link here. Once you have this code, move it into the plugins folder of your theme, you should name the folder direct-chat-plugin.
The value of the property menuItemText
in direct-chat.plugin.js
must be exactly the same as the value of the property label
in direct-chat.plugin.package.json
.
Once you have copied these files, open the settings.json
file inside of your
branding package and add the following code to the plugins array.
{
"id": "direct-chat-plugin-1.0",
"srcURL": "plugins/direct-chat-plugin/direct-chat.plugin.package.json",
"enabled": true
}
If you have any doubt, visit the sections Create a branding package and Upload to Infinity.