2021-02-19 17:21:40 +00:00
|
|
|
# PeerTube plugin livechat *ALPHA VERSION*
|
2020-08-21 07:49:48 +00:00
|
|
|
|
2021-02-18 13:55:02 +00:00
|
|
|
Work In Progress
|
2021-02-18 17:31:12 +00:00
|
|
|
|
|
|
|
Plugin that allows to integrated an iframe with an external webchat application.
|
|
|
|
|
|
|
|
This is under development. It is not functional yet.
|
|
|
|
|
|
|
|
For now, there is no documentation for how you can setup the webchat.
|
|
|
|
It has to be setup by your own. For example with a XMPP Server and the ConverseJS Javascript.
|
|
|
|
|
2021-02-19 18:38:39 +00:00
|
|
|
## XMPP backend with ConverseJS
|
2021-02-19 18:19:38 +00:00
|
|
|
|
2021-02-19 18:38:39 +00:00
|
|
|
### ConverseJS
|
2021-02-19 18:19:38 +00:00
|
|
|
|
|
|
|
Once you have a XMPP server that allow anonymous authentication, with bosh
|
|
|
|
(or websocket) enabled, you can - for example - setup a html page that looks like
|
|
|
|
[this one](documentation/examples/converseJS/index.html). You have of course to
|
|
|
|
replace the path /conversejs/7.0.3 with your converseJS path, and replace your_domain
|
|
|
|
by your actual domain.
|
|
|
|
|
|
|
|
NB : there is a bug in the converseJS 7.0.4 release. The dist files don't work.
|
|
|
|
So if you are not building converseJS yourself, use version 7.0.3 instead.
|
2021-02-19 18:38:39 +00:00
|
|
|
|
|
|
|
NB: for converseJS to find your server configuration (bosh, websocket, ...),
|
|
|
|
you have to add a file [/.well-known/host-meta](documentation/examples/converseJS/host-meta).
|
|
|
|
Please refer to the converseJS documentation.
|
|
|
|
|
|
|
|
### XMPP Server: Prosody
|
|
|
|
|
|
|
|
You can use Prosody for the XMPP backend.
|
|
|
|
|
|
|
|
You can find an example configuration file [here](documentation/examples/prosody/virtualhost.cfg.lua).
|
|
|
|
|
|
|
|
You have to place this file in /etc/prosody/conf.avail/your_domain.cfg.lua.
|
|
|
|
|
|
|
|
Replace peertube.im.your_domain with the domain you want.
|
|
|
|
|
2021-02-19 18:40:51 +00:00
|
|
|
Replace admin@im.your_domain with Jabber ids of users that you want to be admin for your server and public chatrooms.
|
|
|
|
|
2021-02-19 18:38:39 +00:00
|
|
|
There must be a DNS record for that domain.
|
|
|
|
|
|
|
|
NB : no need to have a DNS record for room.peertube.im.your_domain.
|
|
|
|
|
|
|
|
To create the certificate, you can use certbot with letsencrypt:
|
|
|
|
|
|
|
|
```certbot certonly --nginx --emailyour_email -d peertube.im.your_domain```
|
|
|
|
|
|
|
|
Then:
|
|
|
|
|
|
|
|
```prosodyctl --root cert import /etc/letsencrypt/live/```
|
|
|
|
|
|
|
|
Please refer to the [Prosody documentation](https://prosody.im/doc/).
|
|
|
|
|
|
|
|
NB : if you have not nginx on your server, please replace by the correct parameter.
|
|
|
|
|
|
|
|
### XMPP over HTTP: nginx
|
|
|
|
|
|
|
|
You can use the reverse proxy nginx to server the Prosody Bosh server.
|
|
|
|
So your requests will be on the 443 port, and it will minimise cross domains constraints.
|
|
|
|
|
|
|
|
There is an example file [here](documentation/examples/nginx/site.conf).
|
|
|
|
|
|
|
|
NB: this example files also serve the static html files with converseJS.
|
2021-02-19 18:44:19 +00:00
|
|
|
|
|
|
|
NB: it is recommanded to change ```Access-Control-Allow-Origin``` to something else that ```"*"```.
|