Skip to main content

Activate WebSocket

XMPP

The default configuration uses long pooling requests to fetch changes of statuses and messages between the participants.

You can switch to WebSocket. It uses fewer resources. It is more reactive. It needs a bit more configuration.

Jitsi meet

/etc/webapps/jitsi-meet/config.js

var config = {
  websocket: 'wss://YOUR_DOMAIN/xmpp-websocket',
}

Prosody

/etc/prosody/conf.d/jitsi.cfg.lua

-- above virtualhost
consider_websocket_secure = true;
cross_domain_websocket = true;
-- in your virtual host
VirtualHost "YOUR_DOMAIN"
    modules_enabled = {
        -- ...
        "websocket";
    }

Reload prosody

systemctl restart prosody

Bridge

WebSockets can be used instead of WebRTC Data Channels for the transport of Colibri client-to-bridge messages. This needs support from the bridge as well as the client.

When this is enabled, a bridge will advertise a Colibri WebSocket URL together with its ICE candidates. The URL will be specific to an endpoint (in fact the ICE username fragment is reused, encoded as a URL parameter, for authentication), and connections to it will be routed to the Endpoint representation in the bridge.

Jitsi videobridge

/etc/jitsi-videobridge/jvb.conf

videobridge {
  http-servers {
    public {
      port = 9090
    }
  }
  websockets {
    enabled=true
    server-id="default-id"
    tls=true
    domain="YOUR_DOMAIN:443"
  }
}

Reload jitsi-videobridge

systemctl restart jitsi-videobridge