html5-client-event

*We assure you that we do not spam. You may receive occasional emails from us.
 You can always unsubscribe.
HTML5

HTML5 Client Events

All Rooms Event

This event is raised in response to the getAllRooms request. It is passed in the onGetAllRoomsDone request. It exposes the following properties

  • result – Result status of the request.
  • roomIds – room id array of all the rooms.
 
	getResult (); 
	getRoomIds (); 
All Users Event

This event is raised in response to the getOnlineUsers request. It is passed in the onGetOnlineUsersDone method. It exposes the following properties

  • result – Result status of the request.
  • usernames – array of usernames for all the online users.
 
	getResult (); 
	getUserNames (); 

Represents an array of usernames for all the online users if the request is successful.

Chat Event

This event is raised when a chat notification is received from a subscribed location such as room or lobby. It is passed in onChatReceived method. It exposes the following properties

  • chat – The string message sent by the sender.
  • sender – The sender of the message.
  • locId – The id of the location in which the message was sent (eg: room id)
  • isLocationLobby – Is the location a room or lobby.
	getSender (); 
	getChat (); 
	getLocId (); 
	getIsLocationLobby (); 
Live Room Info Event

This event is raised in response to the getLiveRoomInfo or getLiveLobbyInfo request. It is passed in the onGetLiveRoomInfoDone method and in the onGetLiveLobbyInfoDone method. It exposes the following properties

  • users – Array of usernames who are joined in the room
  • customData – Custom data associated with the room
  • properties – Properties associated with the room (empty for lobby).
  • room – The static information structure of the room (or lobby).
  • result – Result status of the request.
 
	getRoom (); 
	getResult (); 
	getUsers (); 
	getCustomData (); 
	getProperties (); 
Live User Info Event

This event is raised in response to the getLiveUserInfo request. It is passed in the onGetLiverUserInfo request method. It exposes the following properties

  • result – Result status of the request.
  • locationId – The id of the location in which the user is present.
  • name – The username of the user
  • customData – The custom data associated with the user
  • isLobby – Is the user’s location a room or a lobby.
 
	getResult (); 
	isLobby (); 
	getLocationId (); 
	getName (); 
	getCustomData (); 
        isPaused (); 
Lobby Event

This event is raised in response to requests for join/leave/subscribe/unsubscribe lobby. It exposes the following properties.

  • result – Result status of the request.
  • lobbyId – The id of the lobby. This is always 0 and is reserved for future if multi-lobby support is added.
  • owner – The owner of the lobby.
  • maxUsers – The max concurrent users allowed in the lobby.
  • name – The name of the lobby.
  • isPrimary – Is the lobby the primary one. This is always true and is reserved for future if multi-lobby support is added.
 
	getResult (); 
	getLobbyId (); 
	getOwner (); 
	getName (); 
	getMaxUsers (); 
	getIsPrimary ();
Room Event

This event is raised in response to requests for join/leave/subscribe/unsubscribe room. It exposes the following properties.

  • roomId – Unique id of a room. It is unique across all the rooms.
  • owner – owner of the room (behavior and usage of this meta property is up to the developer)
  • maxUsers – number of maximum users allowed in the room
  • name – name of the room
  • result – Result status of the request.
 
	getResult (); 
	getRoomId (); 
	getOwner (); 
	getName (); 
	getMaxUsers (); 
Matched Room Event

This event is raised in response to requests for matchmaking request(getRoomInRange/getRoomWithProperties). It exposes the following properties.

  • result – Result status of the request.
  • roomData – Array RoomData objects representing each of the matched rooms.
 
	getResult (); 
	getRooms(); 
Move Event

This event is raised when a move completed notification is received from a subscribed turn based room. It is passed in onMoveCompleted method. It exposes the following properties

  • moveData – The associated move data.
  • sender – The sender of the move.
  • RoomId – The id of the room in which the move was sent
  • nextTurn – The username of the user whose turn it is now
 
	getSender (); 
	getMoveData (); 
	getRoomId (); 
	getNextTurn ();