Streams.Participant Class
Constructs a participant from fields, which are typically returned from the server.
Constructor
Methods
get
-
publisherId
-
streamName
-
userId
-
callback
Get one or more participants, sorted by insertedTime
Parameters:
-
publisherId
String -
streamName
String -
userId
String | ObjectCan 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
FunctionThis 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
getExtra
-
extraName
Get the value of an extra
Parameters:
-
extraName
Stringthe name of the extra to get
Returns:
Events
get.onError
Occurs when Participant.get encounters an error loading a participant from the server