Basic Use - Modules Activation and Join Room
To activate the modules, just use the appropriate action. Some of the modules require the modules they depend on to be active beforehand. For example, it is impossible to enter a room without first connecting to a WebSocket.
Initialize modules
const user = createUser({
config: {host: 'user.dev.zu.casa'}
});
const ws = createWebSocket({
config: {host: 'ws.dev.zu.casa'},
userModule: user,
plugins: [WebSocketReconnection]
})
const room = createRoom({
userModule: user,
webSocketModule: ws,
config: {host: 'room.dev.zu.casa'}
});
const devicesManager = createDevicesManager();
const conference = createConference({
userModule: user,
webSocketModule: ws,
roomModule: room,
devicesManagerModule: devicesManager,
})Open User
user.actions.open(token);token - serves as a representation of your own user within our system. It encapsulates important data provided by you, that can include nickname, full name and avatar.
Open Websocket
webSocket.actions.open();Join Room
room.actions.joinRoom('token')example token: 52jAQLH01rJTSUaAdFFvnHY6sqBTyMn1PYrlk4Mtz4-VskjLxmQcXGgarceWIaVjLzzrnza_MUkHpFoLur4eqiEUcUUSMdMlSAxgHb7aiBAq-kp89pyFO-nNE2oDaPAJ6AVLcdVL_YRgjjY73Tfh5mv91zaDc0SIAB6XciLuBVVO_itpj43d9aEZ3FfW1kBlFer46iWpazgFo1MOhZMj7EI0oBciAjUxpDWzdPd2FSwLsKXa31c4LE6-hhmIDZE5xiqcfmZp2a3tv3QVa_Pfp75pZ8lWDAEfRpq3uzGHvjcj_jzWzvKpxV4cOlzTK5CR7ojcp0C8WydAvVD-H6zTDK4R-CkYW7fn-D046PDmSvNq5xEPccUk
Turn on camera
deviceManager.actions.turnOnCam()Ready
You are sending your camera video to each user in the room.