Files
Testing/videocall4/server.js
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

21 lines
577 B
JavaScript

var isInitiator;
room = prompt("Enter room name:");
var socket = io.connect();
if (room !== "") {
console.log('Joining room ' + room);
socket.emit('create or join', room);
}
socket.on('full', function (room){
console.log('Room ' + room + ' is full');
});
socket.on('empty', function (room){
isInitiator = true;
console.log('Room ' + room + ' is empty');
});
socket.on('join', function (room){
console.log('Making request to join room ' + room);
console.log('You are the initiator!');
});
socket.on('log', function (array){
console.log.apply(console, array);
});