RTCMultiConnection Docs

RTCMultiConnection API Reference / "getStats" method

This method has been removed since v2.2.1.
  1. Using getStats method; you can get statistics like number-of-connected-users etc.
  2. // You can get above values usnig "getStats" method as well:
    connection.getStats(function(stat) {
        console.log(stat.numberOfConnectedUsers);
        console.log(stat.numberOfSessions);
        
        for(var session in stat.sessions) {
           console.log(stat.sessions[session]);
        }
    });
    
    // you can directly access "numberOfConnectedUsers" later like this:
    alert(connection.stats.numberOfConnectedUsers);
    alert( connection.stats.numberOfSessions );
    
    // You can even access all sessions using this object-like array:
    alert( connection.stats.sessions['sessionid'] );
    
    // or
    for(var session in connection.stats.sessions) {
        console.log(connection.stats.sessions[session]);
    }
    

Want to ask a Question?

You can include your email for private conversation!