Represents each one of the user's connection to the session (the local one and other user's connections). Therefore each Session and Stream object has an attribute of type Connection

Hierarchy

  • Connection

Properties

connectionId: string

Unique identifier of the connection

creationTime: number

Time when this connection was created in OpenVidu Server (UTC milliseconds)

data: string

Data associated to this connection (and therefore to certain user). This is an important field: it allows you to broadcast all the information you want for each user (a username, for example)

record: boolean

Whether the streams published by this Connection will be recorded or not. This only affects INDIVIDUAL recording PRO

Only defined for the local connection. In remote connections will be undefined

role: string

Role of the connection.

  • SUBSCRIBER: can subscribe to published Streams of other users by calling subscribe
  • PUBLISHER: SUBSCRIBER permissions + can publish their own Streams by calling publish
  • MODERATOR: SUBSCRIBER + PUBLISHER permissions + can force the unpublishing or disconnection over a third-party Stream or Connection by call forceUnpublish and forceDisconnect

Only defined for the local connection. In remote connections will be undefined

Generated using TypeDoc