Properties observer Peer EventEmitter, emit peer events to your application
@returns EventEmitter readonly
id Peer unique id
channelIds Peer channel ids list
@returns String[] readonly
loginDate Peer login date
uid Peer unique id provided in join params
appData Peer application data provided in join params
@returns Record<string, unknown> readonly
Role Peer role in channel, provided in join params
isMe @returns Boolean readonly
Methods subscribe(producerId) Create a PeerTrack for provided Publisher producerId. Must be called when receiving an event “media-published” from peer observer. Actual list of publishers you can view in peer.publishedMedia
Argument Type Description Required Default producerId String Yes
@async @throws Error subscribe media
Params Publisher Observer Events Enums ConnectionQuality Value Description BAD 1 MEDIUM 2 GOOD 3