RoomStateEventHandlerMap
RoomStateEventHandlerMap =
object
Defined in: src/models/room-state.ts:86
Properties
Section titled “Properties”Beacon.new
Section titled “Beacon.new”Beacon.new: (
event,beacon) =>void
Defined in: src/models/room-state.ts:139
Parameters
Section titled “Parameters”beacon
Section titled “beacon”Returns
Section titled “Returns”void
RoomState.BeaconLiveness
Section titled “RoomState.BeaconLiveness”RoomState.BeaconLiveness: (
state,hasLiveBeacons) =>void
Defined in: src/models/room-state.ts:137
Parameters
Section titled “Parameters”hasLiveBeacons
Section titled “hasLiveBeacons”boolean
Returns
Section titled “Returns”void
RoomState.events
Section titled “RoomState.events”RoomState.events: (
event,state,prevEvent) =>void
Defined in: src/models/room-state.ts:105
Fires whenever the event dictionary in room state is updated. This does not guarantee that any related objects (like RoomMember) have been updated. Use RoomStateEvent.Update for that.
Parameters
Section titled “Parameters”The event which caused this event to fire.
The room state whose RoomState.events dictionary was updated.
prevEvent
Section titled “prevEvent”DigitalWorldEvent | null
The event being replaced by the new state, if
known. Note that this can differ from getPrevContent() on the new state event
as this is the store’s view of the last state, not the previous state provided
by the server.
Returns
Section titled “Returns”void
Example
Section titled “Example”digitalWorldClient.on("RoomState.events", function(event, state, prevEvent){ var newStateEvent = event;});RoomState.Marker
Section titled “RoomState.Marker”RoomState.Marker: (
event,setStateOptions?) =>void
Defined in: src/models/room-state.ts:138
Parameters
Section titled “Parameters”setStateOptions?
Section titled “setStateOptions?”Returns
Section titled “Returns”void
RoomState.members
Section titled “RoomState.members”RoomState.members: (
event,state,member) =>void
Defined in: src/models/room-state.ts:119
Fires whenever a member in the members dictionary is updated in any way.
Parameters
Section titled “Parameters”The event which caused this event to fire.
The room state whose RoomState.members dictionary was updated.
member
Section titled “member”The room member that was updated.
Returns
Section titled “Returns”void
Example
Section titled “Example”digitalWorldClient.on("RoomState.members", function(event, state, member){ var newMembershipState = member.membership;});RoomState.newMember
Section titled “RoomState.newMember”RoomState.newMember: (
event,state,member) =>void
Defined in: src/models/room-state.ts:135
Fires whenever a member is added to the members dictionary. The RoomMember will not be fully populated yet (e.g. no membership state) but will already be available in the members dictionary.
Parameters
Section titled “Parameters”The event which caused this event to fire.
The room state whose RoomState.members dictionary was updated with a new entry.
member
Section titled “member”The room member that was added.
Returns
Section titled “Returns”void
Example
Section titled “Example”digitalWorldClient.on("RoomState.newMember", function(event, state, member){ // add event listeners on 'member'});RoomState.update
Section titled “RoomState.update”RoomState.update: (
state) =>void
Defined in: src/models/room-state.ts:136
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void