diff --git a/openvidu-node-client/src/Connection.ts b/openvidu-node-client/src/Connection.ts index 39240ce6..02eeddc1 100644 --- a/openvidu-node-client/src/Connection.ts +++ b/openvidu-node-client/src/Connection.ts @@ -38,6 +38,16 @@ export class Connection { */ token: string; + /** + * Geo location of the connection, with the following format: `"CITY, COUNTRY"` (`"unknown"` if it wasn't possible to locate it) + */ + location: string; + + /** + * A complete description of the platform used by the participant to connect to the session + */ + platform: string; + /** * Data associated to the connection on the server-side. This value is set with property [[TokenOptions.data]] when calling [[Session.generateToken]] */ @@ -64,11 +74,13 @@ export class Connection { /** * @hidden */ - constructor(connectionId: string, role: OpenViduRole, token: string, serverData: string, clientData: string, + constructor(connectionId: string, role: OpenViduRole, token: string, location: string, platform: string, serverData: string, clientData: string, publishers: Publisher[], subscribers: string[]) { this.connectionId = connectionId; this.role = role; this.token = token; + this.location = location; + this.platform = platform; this.serverData = serverData; this.clientData = clientData; this.publishers = publishers; diff --git a/openvidu-node-client/src/Session.ts b/openvidu-node-client/src/Session.ts index fff88a6b..9b0bd974 100644 --- a/openvidu-node-client/src/Session.ts +++ b/openvidu-node-client/src/Session.ts @@ -452,7 +452,7 @@ export class Session { connection.subscribers.forEach(subscriber => { subscribers.push(subscriber.streamId); }); - this.activeConnections.push(new Connection(connection.connectionId, connection.role, connection.token, connection.serverData, connection.clientData, publishers, subscribers)); + this.activeConnections.push(new Connection(connection.connectionId, connection.role, connection.token, connection.location, connection.platform, connection.serverData, connection.clientData, publishers, subscribers)); }); return this; }