YunoHost-Apps / peertube_ynh

Federated (ActivityPub) video streaming platform using P2P for YunoHost
https://joinpeertube.org/fr/
GNU Affero General Public License v3.0
87 stars 27 forks source link

Plugin peertube-plugin-livechat support #278

Closed JohnXLivingston closed 2 years ago

JohnXLivingston commented 2 years ago

Hello, I am the developper of the plugin peertube-plugin-livechat ( https://github.com/JohnXLivingston/peertube-plugin-livechat ), that provide chat system to Peertube. Currently, my plugin depends on the Prosody XMPP server. But Yunohost came with the Metronome server, that conflicts with Prosody. Several people complained about this, and are looking for a solution.

I am not a Yunohost user, so I'm not familiar with the Yunohost ecosystem. I need some help to be directed to the right solution.

I explained the issue here, in french: https://forum.yunohost.org/t/peertube-plugin-de-chat/17654 I don't know if people behind this repository speaks french?

Can somebody help me to do this integration? Is just saw that this repository code is already installing a plugin (LDAP). Maybe we could also auto-install the peertube-plugin-livechat plugin?

yalh76 commented 2 years ago

Hi,

As written in https://forum.yunohost.org/t/peertube-plugin-de-chat/17654, I see 3 options:

  1. try to install the plugins and look what broke with metronome and what can be adapted
  2. try the manual installation of prosody . that could be a solution for another package jitsi
  3. use the option Connect to an existing XMPP server with ConverseJS
goatmeal01 commented 2 years ago

I got somewhat far with this. My approach is to use the existing metronome with a new vhost for a subdomain where the chat room will live. some of the guts that make up a typical yunohost domain are commented out so it can be nice and clean for the BOSH URI. I am not an expert and I must have the wrong settings somewhere with metronome, NGINX, or at my domain provider.

I can only log into the chat room as a guest in the browser plugin, or with the XMPP account I get on the same yunohost machine. Can't reach it with my 404.city account or any other accounts from the outside. since my friends already have XMPP accounts all over the place, I want them to be able to use them to reach my chat room. Also I can only upload pictures with the one main account. since they are not being served under the subdomain it works as usual. guests cannot upload pictures to the chat room. it just fails. if I manually stick any pictures in the directory where they should go for the subdomain, NGINX isn't serving them.

I am attaching the config files. This was after creating a subdomain chat.example.tv, configuring the DNS settings, and giving it letsencrypt. the DNS diagnostic for the subdomain and suggested DNS config are both showing wrong output in the admin pages and I am including redacted pictures of those too. finally redacted pictures of my namecheap config and the plugin settings.

config.zip

I am a really big fan of the idea of packaging the chat plugin with peertube-ynh and I would love if it could rely only on the existing metronome. wonder how you could deploy the unusual subdomain.

JohnXLivingston commented 2 years ago

I can only log into the chat room as a guest in the browser plugin, or with the XMPP account I get on the same yunohost machine. Can't reach it with my 404.city account or any other accounts from the outside. since my friends already have XMPP accounts all over the place, I want them to be able to use them to reach my chat room. Also I can only upload pictures with the one main account. since they are not being served under the subdomain it works as usual. guests cannot upload pictures to the chat room. it just fails. if I manually stick any pictures in the directory where they should go for the subdomain, NGINX isn't serving them.

I am attaching the config files. This was after creating a subdomain chat.example.tv, configuring the DNS settings, and giving it letsencrypt. the DNS diagnostic for the subdomain and suggested DNS config are both showing wrong output in the admin pages and I am including redacted pictures of those too. finally redacted pictures of my namecheap config and the plugin settings.

config.zip

Maybe a cross domain issue. Have you error logs in your browser?

It seems you have correct CORS headers in some parts of your nginx config files, but perhaps some entrypoints are missing this config?

CORS headers looks something like: https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/0786ae51a0b7d4aeb9bcaa88e0880aee64e3e70c/documentation/examples/nginx/site.conf#L56-L77

I am a really big fan of the idea of packaging the chat plugin with peertube-ynh and I would love if it could rely only on the existing metronome. wonder how you could deploy the unusual subdomain.

I didn't know about Metronome when I started developing this plugin. And now I have to much work on Prosody to switch to Metronome. And I can't maintain the 2 softwares in parallel. (I have multiple Prosody modules to interract with Peertube).

goatmeal01 commented 2 years ago

metronome is a fork of prosody. I had set up prosody before beginning with yunohost and I am seeing that it's so similar all my knowledge is transferring. "Connect to an existing XMPP server" seems to be the right way to go. I just have to figure out how to tweak the config files and I'm golden. I feel so close!

JohnXLivingston commented 2 years ago

metronome is a fork of prosody. I had set up prosody before beginning with yunohost and I am seeing that it's so similar all my knowledge is transferring. "Connect to an existing XMPP server" seems to be the right way to go. I just have to figure out how to tweak the config files and I'm golden. I feel so close!

Yes, but you are missing all the new features I added to the plugin these last months. I made custom Prosody modules to interact with Peertube (set moderators, configure the room, autologin for Peertube's users, etc....). «Connecting to an existing XMPP server» is here for the backward compatibility. But there is no new feature for this mode.

JohnXLivingston commented 2 years ago

Hello, I'm still working on a solution to easily integrate the plugin on yunohost installations.

In the meantime, I wrote a documentation to manually install Prosody on Yunohost: https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/documentation/prosody.md#yunohost

Once you followed these step, you can activate the «Prosody controller by Peertube» mode on the plugin, and save the settings.

yalh76 commented 2 years ago

@JohnXLivingston, for prosody yunohost integration, prosody and prosodyctl are located like in debian at /usr/bin

JohnXLivingston commented 2 years ago

@JohnXLivingston, for prosody yunohost integration, prosody and prosodyctl are located like in debian at /usr/bin

Thanks for your PR!! Hope it will be merged soon :)