Skip to main content

Room

Room object corresponding to a ProCONF room.

Kind: global class
Properties

NameTypeDescription
localParticipantLocalParticipant | nullThe local participant's instance.
participantsMap.<Participant.ID, RemoteParticipant>A map of IDs to remote participants.
sidSIDThe session ID.
namestringThe name of the room.
dominantSpeakerLocalParticipant | RemoteParticipant | nullThe dominant speaker last detected in the room.
isRecordingbooleanWhether the room is being recorded, always false in this version of SDK.
currentDatatrackIdDataTrack.IDThe current datatrack id.

room.getRoomName ⇒ string

Get the room name.

Kind: instance method of Room
Returns: string - The room name.
Throws:

  • ProConfError.ROOM_NOT_EXISTS_ERROR if the Room does not exist.

room.init(roomOptions) ⇒ Promise | Room

Initializes the room.

Kind: instance method of Room
Returns: Promise - A promise that resolves to the object representing the initialized room.Room - The room object.
Throws:

  • ProConfError.EVENT_ERROR if the room cannot be initialized.
  • ProConfError.ROOM_INITIALIZING_ERROR if the room cannot be initialized.

Fulfil: Room object
Reject: ProConfError - Error if room not initialized

ParamTypeDescription
roomOptionsRoomOptionsThe room options.

room.disconnect() ⇒ void

Disconnect from the Room.

Kind: instance method of Room
Throws:

  • ProConfError.ROOM_NOT_EXISTS_ERROR if the Room not exists.

room.getStats() ⇒ Promise.<Array.<PeerConnectionStats>>

Get the Room's media statistics

Kind: instance method of Room

room.refreshInactiveMedia() ⇒ void

Restart the muted local media Tracks and play inadvertently paused HTMLMediaElements that are attached to local and remote media Tracks. This method is useful mainly on mobile browsers (Safari and Chrome on iOS), where there is a possibility that the muted local media Tracks are never unmuted and inadvertently paused HTMLMediaElements are never played again, especially after handling an incoming phone call.

Kind: instance method of Room
Throws:

  • ProConfError - Function not Supported.

room.join(password, [replaceParticipant]) ⇒ void

Joins the Room.

Kind: instance method of Room
Throws:

  • ProConfError if fail to join the Room.
ParamTypeDefaultDescription
passwordstringThe password to join the room.
[replaceParticipant]booleanfalseWhether to replace the participant.

room.end() ⇒ void

Ends the room.

Kind: instance method of Room
Throws:

  • ProConfError if the Room not exists.

room.getLocalUserId() ⇒ string

Fetches the user ID of the local participant.

Kind: instance method of Room
Returns: string - The user ID of the local participant or null if the Room is not initialized.
Throws:

  • ProConfError if the Room not exists.

room.addLocalTrack(track) ⇒ Promise

Adds a local track to the room.

Kind: instance method of Room
Returns: Promise - A promise that resolves when the track is added successfully.
Throws:

  • ProConfError if the participant does not exist or administrator has disabled videoCall config from backend.

Fulfil: void
Reject: ProConfError On error

ParamTypeDescription
trackLocalTrack | MediaStreamTrackThe LocalTrack or media stream track to be added.

room.addLocalDataTrack(track) ⇒ Promise

Adds a local data track to the room.

Kind: instance method of Room
Fulfil: void - The local datatrack.

ParamType
trackDataTrack

Room.SID : string

Type of room.sid

Kind: static typedef of Room

Room.State : string

State of room; any of - 'connected' | 'disconnected' | 'reconnecting'

Kind: static typedef of Room

Room.Events

Kind: static typedef of Room
Properties

NameTypeDescription
roomJoinedRoomJoinedEventRoom joined event
disconnectedDisconnectedEventRoom disconnected event
participantConnectedParticipantConnectedEventParticipant connected event
participantDisconnectedParticipantDisconnectedEventParticipant disconnected event
trackSubscribedTrackSubscribedEventTrack subscribed event
trackUnsubscribedTrackUnsubscribedEventTrack unsubscribed event
dominantSpeakerChangedDominantSpeakerChangedEventDominant speaker changed event
mediaSessionStartedMediaSessionStartedEventMedia session started event
mediaActiveSessionChangedMediaActiveSessionChangedEventMedia active session changed event
audioInputStateChangeAudioInputStateChangeEventAudio input state change event
audioUnmutePermissionsChangedAudioUnmutePermissionsChangedEventAudio unmute permissions changed event
noAudioInputNoAudioInputEventNo audio input event
nonParticipantMessageReceivedNonParticipantMessageRecivedEventNon participant message received event
privateMessageReceivedPrivateMessageReceivedEventPrivate message received event
visitorsMessageVisitorsMessageEventVisitors message event
visitorsRejectionVisitorsRejectionEventVisitors rejection event
roomErrorRoomErrorEventRoom error event
roomJoinInProgressRoomJoinInProgressEventRoom join in progress event
roomLeftRoomLeftEventRoom left event
roomUniqueIdSetRoomUniqueIdSetEventRoom unique ID set event
roomCreatedTimestampRoomCreatedTimestampEventRoom created timestamp event
connectionRestoredConnectionRestoredEventConnection restored event
connectionInterruptedConnectionInterruptedEventConnection interrupted event
connectionRedirectedConnectionRedirectedEventConnection redirected event
lobbyUserJoinedLobbyUserJoinedEventLobby user joined event
lobbyUserLeftLobbyUserLeftEventLobby user left event
lobbyUserUpdatedLobbyUserUpdatedEventLobby user updated event
membersOnlyChangedMembersOnlyChangedEventMembers only changed event
userStatusChangedUserStatusChangedEventUser status changed event
messageReceivedMessageReceivedEventMessage received event
trackAddedTrackAddedEventTrack added event
trackRemovedTrackRemovedEventTrack removed event
trackAudioLevelChangedTrackAudioLevelChangedEventTrack audio level changed event
trackUnmuteRejectedTrackUnmuteRejectedEventTrack unmute rejected event
breakoutRoomsMoveToRoomBreakoutRoomsMoveToRoomEventBreakout rooms move to room event
dataChannelClosedDataChannelClosedEventData channel closed event
dataChannelOpenedDataChannelOpenedEventData channel opened event
participantKickedParticipantKickedEventParticipant kicked event