import { Publisher } from './Publisher'; import { ConnectionProperties } from './ConnectionProperties'; import { OpenViduRole } from './OpenViduRole'; /** * See {@link Session.connections} */ export declare class Connection { /** * Identifier of the Connection. You can call methods {@link Session.forceDisconnect} * or {@link Session.updateConnection} passing this property as parameter */ connectionId: string; /** * Returns the status of the Connection. Can be: * - `pending`: if the Connection is waiting for any user to use * its internal token to connect to the session, calling method * [Session.connect](https://docs.openvidu.io/en/stable/api/openvidu-browser/classes/Session.html#connect) * in OpenVidu Browser. * - `active`: if the internal token of the Connection has already * been used by some user to connect to the session, and it cannot be used * again. */ status: string; /** * Timestamp when the Connection was created, in UTC milliseconds (ms since Jan 1, 1970, 00:00:00 UTC) */ createdAt: number; /** * Timestamp when the Connection was taken by a user (passing from status "pending" to "active") * in UTC milliseconds (ms since Jan 1, 1970, 00:00:00 UTC) */ activeAt: number; /** * PRO * Geo location of the Connection, with the following format: `"CITY, COUNTRY"` (`"unknown"` if it wasn't possible to locate it) */ location: string; /** * IP of the Connection, as seen by OpenVidu Server */ ip: 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 client-side. This value is set with second parameter of method * [Session.connect](/en/stable/api/openvidu-browser/classes/Session.html#connect) in OpenVidu Browser */ clientData: string; /** * The {@link ConnectionProperties} assigned to the Connection */ connectionProperties: ConnectionProperties; /** * Token associated to the Connection. This is the value that must be sent to the client-side to be consumed in OpenVidu Browser * method [Session.connect](https://docs.openvidu.io/en/stable/api/openvidu-browser/classes/Session.html#connect). */ token: string; /** * Array of Publisher objects this particular Connection is publishing to the Session (each Publisher object has one Stream, uniquely * identified by its `streamId`). You can call {@link Session.forceUnpublish} passing any of this values as parameter */ publishers: Publisher[]; /** * Array of streams (their `streamId` properties) this particular Connection is subscribed to. Each one always corresponds to one * Publisher of some other Connection: each string of this array must be equal to one {@link Publisher.streamId} of other Connection */ subscribers: string[]; /** * @hidden deprecated. Inside ConnectionProperties */ role?: OpenViduRole; /** * @hidden deprecated. Inside ConnectionProperties */ serverData?: string; /** * @hidden */ constructor(json: any); /** * @hidden */ resetWithJson(json: any): Connection; /** * @hidden */ equalTo(other: Connection): boolean; /** * @hidden */ overrideConnectionProperties(newConnectionProperties: ConnectionProperties): void; }