Sign in and connect your server. Generate a live link for Video/Audio calls and Chat. Copy and use in web or Android apps.
Sign in with your Google account to deploy your services.
/server-status.json that returns { "status":"ok" } OR be a reachable signaling server URL. (See sample server.js below.)
This minimal Node/WS server handles join/offer/answer/ice exchange. Run it where you host your signaling (or modify to your needs).
/*
Minimal signaling server (Node.js + ws)
Save as server.js and run: npm i ws uuid && node server.js
*/
const WebSocket = require('ws');
const { v4: uuidv4 } = require('uuid');
const PORT = process.env.PORT || 3000;
const wss = new WebSocket.Server({ port: PORT });
console.log('Signaling server running on port', PORT);
const rooms = {}; // roomId -> Set of sockets
wss.on('connection', ws => {
ws.on('message', msg => {
try {
const data = JSON.parse(msg);
const { type, room, payload } = data;
if (type === 'join') {
ws.room = room;
rooms[room] = rooms[room] || new Set();
rooms[room].add(ws);
// notify others
rooms[room].forEach(s => {
if (s !== ws) s.send(JSON.stringify({ type: 'peer-joined' }));
});
}
if (type === 'signal') {
// forward signaling to other peers in the same room
(rooms[room] || []).forEach(s => {
if (s !== ws) s.send(JSON.stringify({ type: 'signal', payload }));
});
}
} catch (e) {
console.error('invalid msg', e);
}
});
ws.on('close', () => {
if (ws.room && rooms[ws.room]) {
rooms[ws.room].delete(ws);
rooms[ws.room].forEach(s => s.send(JSON.stringify({ type: 'peer-left' })));
}
});
});