Show:

Streams.Participant Class

Constructs a participant from fields, which are typically returned from the server.

Constructor

Streams.Participant

(
  • fields
)

Parameters:

Item Index

Methods

Events

Methods

get

(
  • publisherId
  • streamName
  • userId
  • callback
)
static

Get one or more participants, sorted by insertedTime

Parameters:

  • publisherId String
  • streamName String
  • userId String | Object

    Can be the id of the participant user, or an object containing one or more of: "limit": The maximum number of participants to retrieve. "offset": The offset of the participants to retrieve. If it is -1 or lower, then participants are sorted by descending insertedTime. "state": The state of the participants to filter by, if any. Can be one of ('invited', 'participating', 'left')

  • callback Function

    This receives two parameters. The first is the error. If userId was a String, then the second parameter is the Streams.Participant, as well as the "this" object. If userId was an Object, then the second parameter is a hash of { userId: Streams.Participant } pairs

getAllExtras

() Object

Get all extra attributes

Returns:

getExtra

(
  • extraName
)
Mixed

Get the value of an extra

Parameters:

  • extraName String

    the name of the extra to get

Returns:

Mixed:

Events

get.onError

Occurs when Participant.get encounters an error loading a participant from the server