peertube-plugin-livechat/documentation/conversejs.md

47 lines
1.9 KiB
Markdown
Raw Normal View History

2021-06-11 16:32:32 +00:00
# Connect to an existing XMPP server with ConverseJS
If you have an XMPP server, and don't want to provide a web chat application by yourself, you can use the builtin ConverseJS implementation.
ConverseJS is an Free and Open Source Javascript library to connect to Jabber/XMPP servers.
2021-04-16 15:55:48 +00:00
**Important Note**: If you don't have a running XMPP server, here is a
**[tutorial to install Prosody XMPP Server](./tutorials/prosody.md) on your Peertube instance**.
## Plugin Settings
2021-06-11 16:32:32 +00:00
### Chat mode
2021-04-16 15:55:48 +00:00
2021-06-11 16:32:32 +00:00
Just select «Connect to an existing XMPP server with ConverseJS» as chat mode.
2021-04-16 15:55:48 +00:00
2021-06-11 16:32:32 +00:00
#### XMPP service server (mandatory)
2021-04-16 15:55:48 +00:00
The XMPP server. For example: ```peertube.im.your_domain```.
NB: If you have an existing Prosody server, you can use its address if it has anonymous authentication on.
Otherwise, you can create a subdomain (see [the example file](documentation/examples/prosody/virtualhost.cfg.lua)).
The ```peertube.im``` is part of the example, you have to replace the entire value.
2021-06-11 16:32:32 +00:00
#### XMPP room template (mandatory)
2021-04-16 15:55:48 +00:00
The room to join on your XMPP server.
You can have a single room for all webchats, or you can use the placeholder ```{{{VIDEO_UUID}}}``` to insert the video UUID and have a custom room for each video.
Example: ```room_{{VIDEO_UUID}}@room.peertube.im.your_domain```
2021-06-11 16:32:32 +00:00
#### BOSH uri OR Websocket uri
2021-04-16 15:55:48 +00:00
You have to provide at least one of these two settings.
Example for BOSH: ```https://peertube.im.yiny.org/http-bind```
Example for Websocket: ```wss://peertube.im.yiny.org/xmpp-websocket```
NB: ConverseJS can also use the ```/.well-known/host-meta``` file to discover services.
See ConverseJS [documentation](https://conversejs.org/docs/html/configuration.html#discover-connection-methods)
and XMPP [documentation](https://xmpp.org/extensions/xep-0156.html#httpexamples).
2021-06-11 16:32:32 +00:00
### Chat behaviour
These settings are common with other chat modes.
Here is the documentation: [common settings](./common.md).