new sessionObj()
The primary method for interfacing with an EasyRTC session.
- Source:
Members
-
<static> sessionObj.events
-
Expose all event functions
- Source:
-
<static> sessionObj.util
-
Expose all utility functions
- Source:
Methods
-
<static> sessionObj.getApp() → {Object}
-
Returns the application object to which the session belongs. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
- Source:
Returns:
The application object- Type
- Object
-
<static> sessionObj.getAppName() → {string}
-
Returns the application name for the application to which the session belongs. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
- Source:
Returns:
The application name- Type
- string
-
<static> sessionObj.getEasyrtcsid() → {string}
-
Returns the easyrtcsid for the session. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
- Source:
Returns:
Returns the easyrtcsid, which is the EasyRTC unique identifier for a session.- Type
- string
-
<static> sessionObj.getField(Field, callback)
-
Returns session level field object for a given field name.
Parameters:
Name Type Description Field
string name callback
function Callback with error and field value (any type) - Source:
-
<static> sessionObj.getFields(limitToIsShared, callback)
-
Returns an object containing all field names and values within the session. Can be limited to fields with isShared option set to true.
Parameters:
Name Type Description limitToIsShared
boolean Limits returned fields to those which have the isShared option set to true. callback
function Callback with error and object containing field names and values. - Source:
-
<static> sessionObj.setField(fieldName, fieldValue, fieldOption, next)
-
Sets session field value for a given field name.
Parameters:
Name Type Argument Description fieldName
string Must be formatted according to "fieldNameRegExp" option. fieldValue
Object fieldOption
Object <nullable>
Field options (such as isShared which defaults to false) next
nextCallback <optional>
A success callback of form next(err). Possible err will be instanceof (ApplicationWarning). - Source: