Started work on back-end for synced video playback.

This commit is contained in:
rainbow napkin 2025-01-12 17:50:54 -05:00
parent b443840c29
commit 0b68db1265
6 changed files with 131 additions and 10 deletions

View file

@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
//local imports
const connectedUser = require('./connectedUser');
const queue = require('./media/queue');
const flairModel = require('../../schemas/flairSchema');
const permissionModel = require('../../schemas/permissionSchema');
@ -26,6 +27,7 @@ module.exports = class{
this.tokeCommands = chanDB.tokeCommands;
//Keeping these in a map was originally a vestige but it's more preformant than an array or object so :P
this.userList = new Map();
this.queue = new queue(server, this);
}
async handleConnection(userDB, chanDB, socket){
@ -52,6 +54,7 @@ module.exports = class{
//if everything looks good, admit the connection to the channel
socket.join(socket.chan);
//Hand off the connection initiation to it's user object
await userObj.handleConnection(userDB, chanDB, socket)
//Send out the userlist