Skip to content

Chat2 Plugin

Daniel Neto edited this page Jul 17, 2020 · 16 revisions

That is a plugin to replace the regular LiveChat

The main propose of the Chat2 plugin is to connect Channel owners and subscribers, but also we allow users to chat with each other.

This plugin allows you to display chats windows on Channels, LiveStreams, Main Video Player page, and Embed Videos. You can enable and disable any of these options to display the chat.

We also display this Chats on the mobile APP (TODO)

Stand Alone Chat Server

Due to the high demand for hardware caused by chat, when it starts to be very consumed by users, we decided to allow this to be separated from the main server, we will call this Chat Stand Alone (CSA).

CSA will always authenticate on the streamer, that is, only active users on the Streamer will be able to log in. However the rest of the processes will take place on the Chat server, thus leaving the platform-independent of your main video server, so your streamer will not be affected, even if the chat reaches peak usage.

Despite being tested only on Ubuntu, we believe that Chat can work on any operating system with PHP + MySQL

Below are the instructions needed to make your chat work on other servers.

  1. Chat2 must be enabled
  2. API must be enabled
  3. Copy all files from the Chat2 plugin to a new server. Feel free to use any transfer tool, for example you can use Filezilla or Winscp
  4. Create a database for the Chat2. sudo mysql -u username -p -e "CREATE DATABASE database_name;"
  5. Edit the file /path/to/Chat2/standAlone/config.php with the following code
<?php 
$global['serverName'] = '[Edit with your server name, can be any string]';
$global['webSiteRootURLStandAlone'] = '[Edit with your chat server URL, I.E. https://chat.mysite.com/]';
$global['systemRootPath'] = '[Edit with your server path, I.E. /var/www/html/Chat2/]';
$mysqlHost = 'localhost';
$mysqlUser = 'username';
$mysqlPass = 'password';
$mysqlDatabase = 'database_name';
$global['webSiteRootURL'] = '[streamerSiteURL]';
$APISecret="[get it in your API Plugin]";
Clone this wiki locally