Spreed: Chat integration

Created on 18 Apr 2017  路  17Comments  路  Source: nextcloud/spreed

Some ideas how we can integrate Chat into the Spreed app.

General concept

  • It will be based on the current Spreed app
  • If you join a group/room we start with a text-only chat
  • chat will be in the main area, left hand sidebar stays the same
  • text chat goes through the server (not p2p)
  • server keeps history as long as the room exists (room gets deleted when the last person leaves it)
  • During chat-only sessions we pull every second for new messages
  • During a call we use the signaling (which already happens every second) to get new messages

Initiating a call

  • There will be a "call" button
  • Clicking the call button will call all people in the room
  • If someone joins the chat during a call and clicks the "call" button he will directly join the group call
  • In case of a call the chat should move to the right side and the main area should be used for video

Screen sharing

  • On screen sharing all sidebars (chat, video of the participants, etc) should slide away and be accessible on hover/click so that we have as much space as possible for the shared screen.

Federation

  • Federation should be possible both for video/audio and for text chats using the federated cloud id
  • Server which created the room will be responsible to keep chat history and to host the call

Integrate with other networks

We shortly discussed the possibility to integrate with other networks like Matrix, XMPP, IRC, etc. This enabled us to use existing clients and let people join chats their preferred way.

Challenge:

  • how to handle incoming calls on 3rdparty clients, if people connect through one of the other networks to a group, etc.

This was the result of some brain storming with @Ivansss @nickvergessen @karlitschek and @pfiff45

Feel free to comment and discuss the ideas

chat 馃挰 overview

Most helpful comment

I would try to build on the jsxc app as much as possible here, or even start with that instead of starting from scratch. Sure, the XMPP protocol might not have the type of federation we want, but that is no reason why we couldn't just do it by adding our own extension. No, that wouldn't be a standard but neither would starting from scratch...

If we're looking to support XMPP at some point, starting with XMPP would make that a whole lot easier ;-)

And we already get all the good stuff written in JSXC.

All 17 comments

Additional feature request:

  • Allow to save a chat log as a file: #232

Agree with all the points! :) Would be cool to get that integrated. Also cc @sualko @LEDfan of the Chat app for info.

I would try to build on the jsxc app as much as possible here, or even start with that instead of starting from scratch. Sure, the XMPP protocol might not have the type of federation we want, but that is no reason why we couldn't just do it by adding our own extension. No, that wouldn't be a standard but neither would starting from scratch...

If we're looking to support XMPP at some point, starting with XMPP would make that a whole lot easier ;-)

And we already get all the good stuff written in JSXC.

Applause!
Good stuff in JSXC: the always-on approach; whenever you are logged in, you are available for a chat (if the server doesn't timeout you).
Bad stuff: Due to the architecture, JSXC cannot be activated for just some groups only.

XMPP being a widespread protocol, it would make sense to use it in my eyes.

Edit: removed reference to stalled login - this issue got addressed already. Thanx

@joergmschulz Thanks for your kind words, we are always open for improvements. If you find bugs, please report them to https://github.com/jsxc/jsxc/issues. An unavailable xmpp server e.g. should not result in login errors and it is possible to enhance jsxc to allow chat only for defined groups, but this is currently not on our roadmap.

@jospoortvliet i like your idea and this extension could be a standard in the future, because everyone can submit an xep proposal, see https://xmpp.org/extensions/xep-0001.html

Here are some mockups of how an integrated chat could look like for the Video calls app.

On desktop, on the right above the personal video, half-transparent and overlaid over the other persons video:
video calls chat desktop

On mobile, also half-transparent and overlaid over the other persons video, so you can still see them:
video calls chat mobile

Cool, it looks nice for the first. But i think the usebility for more then one chat is not so clear...

A very basic code that might help start this is at https://github.com/bkmgit/SimplePHPchat, though many others are also available online. Could rewrite to link into Nextcloud framework, use routes and database hooks as well as authentication.

Another protocol that might be of interest is SIP protocol used in GNU ring

when this wil be released?

A first version is scheduled for Nextcloud 13

I like the idea of integrating Matrix and IRC to the app.

Matrix would be nice, because with matrix/riot its possible to build bridges to the other chats too. IRC for example, even wahtsapp and more. So, my understanding is: When integrating matrix its possible to chat with various other protocolls.

Yes the usage of IRC etc via Matrix is possible. Unfortunately the synapse (Matrix Reference Server) seem overwhelmed with big IRC channels (like Archlinux).


Matrix: Definition of the Server\~Server and Server\~Client interface
Riot: Most commonly used client software
Synapse: Most commonly used server software

I like also the idea of matrix, because the installation is easy on Debian / Ubuntu and they have good clients for all different OS.

It would be good to implement chat-only mode. Currently web application fails completely without camera and microphone.

@p5n that is fixed for the next version already

Closing this, since basic chat support is now working.
If there are still things open a new issue should be created

Was this page helpful?
0 / 5 - 0 ratings