Appendix contains JSON Payloads and JSON Objects received with Callbacks of many methods and with Event Notifications. These are listed in random order.

Table of Contents

Token

Given below a decoded version of the JWT Token you receive when you create a Token using Server API Call.

{
     "tokenId": "",         // Token ID 
     "room": {              // Room Definition 
         "name": "",
         "owner_ref": "",
         "settings": { },
         "sip": { },
         "data": { }, 
         "created": "",
         "_id": ""
     },
     "host": "",             // EnableX Server hosting the session
     "secure": true,         // Boolean. Whether to use Secured Web Socket
     "logId": "",            // Unique Log ID for logging of session events
     "gateway": "",          // EnableX Gateway
     "signature": "",        // Token Signature
     "version": "0.1"        // Toolkit Version used
 }

User Meta Information

User Meta information contains connected user’s data and his privileges within the session. EnxRoom.whoami() returns connected user information using this JSON structure. Further, the same JSON structure is used to carry user-information by many event notifications, e.g. room-connected, user-connected, user-disconnected, user-awaited etc.

{
     "clientId": "",             // Unique Client ID assigned by EnableX
     "name": "",                 // User's name
     "user_ref": "",             // User's Reference
     "role": "participant",      // Enum: moderator, participant
     "permissions": {            // In-Session Permission of User
         "publish": Boolean,     // Whether user can pubish local stream
         "subscribe": Boolean,   // Whether user can subscribe remote streams
         "record": Boolean,      // Whether user can initiate recording
         "stats": Boolean,       // Whether user can view stream status
         "controlhandlers": Boolean  
     }
 }

Room Meta Information

Room Meta information contains complete Room Definition (Using Server API) along with many Run-Time parameters with their current values. This is received by all end-points after getting connected to Room along with room-connected event. Some of the run-time parameters are updated internally by the Toolkit on various events.

{    
     "user": {				// Connected User Meta Information
		/* user-meta-info-json-structure */
     },
     "room": {
		"name": "!",		// Room Name
		"owner_ref": "",	// Owner Reference 
		"settings": { },	// Settings - Config
		"sip": { },		// SIP Config
		"data": { },		// Custom Data
		"created": "",		// Room Creation Timestamp UTC
		"_id": ""
	},
     "remoteStreams":  [{			// Streams in Room - to subscribe
		"id": 1,
		"audio": true,
		"video": true,
		"data": true,
		"screen": false,
		"attributes": {}
	}],           
     "userList": [{			 // Meta Information of connected users
		/* user-meta-info-json-structure */
	}],          
     "awaitedParticipants": [ /*client-ids*/ ],	// Users awaited to connect
     "raisedHands": [ /*client-ids*/ ],		// Users seeking floor access
     "approvedHands": [ /*client-ids*/ ],	// Users with floor access
     "pinnedUsers": [ /*client-ids*/ ],	 // Pinned User List
     "recording": false,		 // True if room is being recorded
     "hardmute": false,			 // True if room is on hard-mute state 
     "defaultVideoBW": Number,		 // Default Video Bandwidth
     "maxVideoBW": Number		 // Max Video Bandwidth - Deprecated in Android SDK v2.0.1+
}

Stream Options to initialize

{
     "audio": true,          // Whether to add Audio to stream
     "video": true,          // Whether to add Video to stream
     "data": true,           // Whether to add Data to stream
     "screen": false,        // Whether to add Screen Share to stream
     "videoSize": [minWidth, minHeight, maxWidth, maxHeight], // Video Frame Size - Deprecated in Android SDK v2.0.1+, iOS SDK v2.0.1+, React Native SDK v1.6+ & Flutter SDK v1.6+.
     "audioMuted": true,     // Audio muted on entry to room  
     "videoMuted": true,     // Video muted on entry to room  
     "attributes": {         // Object to carry custom data  
         "custom1": ""
      },
     "options": {}           // Video Player Options */
     "videoSize": [minWidth, minHeight, maxWidth, maxHeight],
     "maxVideoLayers": Number// Number of Video Layers in Stream
                             // Enumerated Values: 1, 2, 3                               
                             // 1=HD 720p layer only
                             // 2=HD 720p & SD 480p layers only
                             // 3=HD 720p, SD 480p & LD 240p/180p layers  
 }

Player Options

EnableX Player may be configured in a JSON Structure and passed in EnxRtc.joinRoom() or EnxStream.play() method.

{
	"player": {
		"height": "",		// Player Height in Px 
		"width":"",		// Player Width in Px - Deprecated in Android SDK v2.0.1+
		"minHeight": "",	// Player Min Height in Px - Deprecated in Android SDK v2.0.1+
		"minWidth": "",		// Player Min Width in Px 
		"abwd": {		// Video Drop Notice on Player on low bandwidth
			"receiveNotification": Boolean, // true to show Notice
			"language": ""                  // Enum: en, zh. 
					// Default: en - Notice Language           
		} 
	},
	toolbar: {			// To configure default player toolbar
		displayMode: false,	// To show/hide default toolbar
		branding: {		// To show/hide branding information i.e.logo 
			display: false
		}
	}
 }

Subscribed Stream Information

The following JSON Object you receive about a Stream you subscribed successfully along with the event stream-subscribed

{
     "type":"stream-subscribed",
     "stream":{
         "eventsList":{},
         "config":{
             "streamID":21,
             "local":false,
             "audio":false,
             "video":true,
             "data":false,
             "canvas":true,
             "attributes":{}
         },
         "stream":{},
         "showing":false,
         "local":false,
         "video":true,
         "audio":false,
         "audioMuted":false,
         "videoMuted":false,
         "hardAudioMuted":false,
         "hardVideoMuted":false,
         "selfMuteVideo":false,
         "selfMuteAudio":false,
         "ATVideoMuted":false,
         "processingVideoMute":false,
         "attributes":{},
         "Connection":{},
         "playerDivs":[],
         "canvas":true,
         "transactions":{},
         "pc":{}
     }
 }