new appObj()
The primary method for interfacing with an EasyRTC application.
- Source:
- easyrtc_public_obj.js, line 1034
Classes
Members
-
<static> appObj.events
-
Expose all event functions
- Source:
- easyrtc_public_obj.js, line 1059
-
<static> appObj.util
-
Expose all utility functions
- Source:
- easyrtc_public_obj.js, line 1067
Methods
-
<static> appObj.connection(easyrtcid, callback)
-
Gets connection object for a given connection key. Returns null if connection not found. The returned connection object includes functions for managing connection fields.
Parameters:
Name Type Description easyrtcidstring EasyRTC unique identifier for a socket connection. callbackconnectionCallback Callback with error and object containing EasyRTC connection object. - Source:
- easyrtc_public_obj.js, line 1281
-
<static> appObj.createConnection(easyrtcid, callback)
-
Creates a new connection with a provided connection key
Parameters:
Name Type Description easyrtcidstring EasyRTC unique identifier for a socket connection. callbackfunction(Error, Object) Callback with error and object containing EasyRTC connection object (same as calling connection(easyrtcid)) - Source:
- easyrtc_public_obj.js, line 2150
-
<static> appObj.createRoom(roomName, options, callback)
-
Creates a new room, sending the resulting room object to a provided callback.
Parameters:
Name Type Argument Description roomNamestring Room name which uniquely identifies a room within an EasyRTC application. optionsobject <nullable>
Options object with options to apply to the room. May be null. callbackfunction(Error, Object) Callback with error and object containing EasyRTC room object (same as calling appObj.room(roomName)) - Source:
- easyrtc_public_obj.js, line 2213
-
<static> appObj.createSession(easyrtcsid, callback)
-
Creates a new session with a provided easyrtcsid
Parameters:
Name Type Description easyrtcsidstring EasyRTC Session Identifier. Must be formatted according to "easyrtcsidRegExp" option. callbackfunction(Error, Object) Callback with error and object containing EasyRTC session object (same as calling session(easyrtcsid)) - Source:
- easyrtc_public_obj.js, line 2283
-
<static> appObj.getAppName() → {string}
-
Returns the application name for the application. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
- Source:
- easyrtc_public_obj.js, line 1076
Returns:
The application name.- Type
- string
-
<static> appObj.getConnectionEasyrtcids(callback)
-
Returns an array of all easyrtcid's connected to the application
Parameters:
Name Type Description callbackfunction(Error, Array.<string>) Callback with error and array of easyrtcid's. - Source:
- easyrtc_public_obj.js, line 1087
-
<static> appObj.getEasyrtcsids(callback)
-
Returns an array of all easyrtcsid's within the application
Parameters:
Name Type Description callbackfunction(Error, Array.<string>) Callback with error and array containing easyrtcsid's. - Source:
- easyrtc_public_obj.js, line 1182
-
<static> appObj.getField(Field, callback)
-
Returns application level field object for a given field name.
Parameters:
Name Type Description Fieldstring name callbackfunction(Error, Object) Callback with error and field value (any type) - Source:
- easyrtc_public_obj.js, line 1103
-
<static> appObj.getFields(limitToIsShared, callback)
-
Returns an object containing all field names and values within the application. Can be limited to fields with isShared option set to true.
Parameters:
Name Type Description limitToIsSharedboolean Limits returned fields to those which have the isShared option set to true. callbackfunction(Error, object) Callback with error and object containing field names and values. - Source:
- easyrtc_public_obj.js, line 1120
-
<static> appObj.getGroupNames(callback)
-
Returns an array of all group names within the application
Parameters:
Name Type Description callbackfunction(Error, Array.<string>) Callback with error and array of group names. - Source:
- easyrtc_public_obj.js, line 1140
-
<static> appObj.getOption(option) → {*}
-
Gets individual option value. Will first check if option is defined for the application, else it will revert to the global level option.
Parameters:
Name Type Description optionString Option name - Source:
- easyrtc_public_obj.js, line 1156
Returns:
Option value (can be any JSONable type)- Type
- *
-
<static> appObj.getRoomNames(callback)
-
Returns an array of all room names within the application.
Parameters:
Name Type Description callbackfunction(Error, Array.<string>) Callback with error and array of room names. - Source:
- easyrtc_public_obj.js, line 1167
-
<static> appObj.group(Group, callback)
-
NOT YET IMPLEMENTED - Gets group object for a given group name. Returns null if group not found. The returned group object includes functions for managing group fields.
Parameters:
Name Type Description Groupstring name callbackfunction(Error, Object) Callback with error and object containing EasyRTC group object. - Source:
- easyrtc_public_obj.js, line 2340
-
<static> appObj.isConnected(easyrtcid, callback)
-
Gets connection status for a connection. It is possible for a connection to be considered connected without being authenticated.
Parameters:
Name Type Description easyrtcidstring EasyRTC unique identifier for a socket connection. callbackfunction(Error, Boolean) Callback with error and a boolean indicating if easyrtcid is connected. - Source:
- easyrtc_public_obj.js, line 1206
-
<static> appObj.isRoom(roomName, callback)
-
Checks if a provided room is defined. The callback returns a boolean if room is defined
Parameters:
Name Type Description roomNamestring Room name which uniquely identifies a room within an EasyRTC application. callbackfunction(Error, {boolean}) Callback with error and boolean of whether room is defined. - Source:
- easyrtc_public_obj.js, line 2316
-
<static> appObj.isSession(callback)
-
Checks if a provided session is defined. The callback returns a boolean if session is defined
Parameters:
Name Type Description callbackfunction(Error, {boolean}) Callback with error and boolean of whether session is defined. - Source:
- easyrtc_public_obj.js, line 2327
-
<static> appObj.room(roomName, callback)
-
Gets room object for a given room name. Returns null if room not found. The returned room object includes functions for managing room fields.
Parameters:
Name Type Description roomNamestring Room name which uniquely identifies a room within an EasyRTC application. callbackfunction(Error, Object) Callback with error and object containing EasyRTC room object. - Source:
- easyrtc_public_obj.js, line 2388
-
<static> appObj.session(easyrtcsid, callback)
-
NOT YET IMPLEMENTED - Gets session object for a given easyrtcsid. Returns null if session not found. The returned session object includes functions for managing session fields.
Parameters:
Name Type Description easyrtcsidstring callbackfunction(Error, Object) Callback with error and object containing EasyRTC session object. - Source:
- easyrtc_public_obj.js, line 2661
-
<static> appObj.setField(fieldName, fieldValue, fieldOption, next)
-
Sets application field value for a given field name.
Parameters:
Name Type Argument Description fieldNamestring Must be formatted according to "fieldNameRegExp" option. fieldValueObject fieldOptionObject <nullable>
Field options (such as isShared which defaults to false) nextnextCallback <optional>
A success callback of form next(err). - Source:
- easyrtc_public_obj.js, line 1252
-
<static> appObj.setOption(optionName, optionValue) → {Boolean}
-
Sets individual option. Set value to NULL to delete the option (thus reverting to global option).
Parameters:
Name Type Argument Description optionNameString Option name optionValue* <nullable>
Option value - Source:
- easyrtc_public_obj.js, line 1223
Returns:
true on success, false on failure- Type
- Boolean