Defining mandatory and optional fields in input config

playerConfig = {
"context": { // mandatory
"mode": "play", // Mandatory , To identify preview used by the user to play/edit/preview
"authToken": "", // Optional, Auth key to make api calls
"sid": "7283cf2e-d215-9944-b0c5-269489c6fa56", // Mandatory , User sessionid on portal or mobile
"did": "3c0a3724311fe944dec5df559cc4e006", // Mandatory, Unique id to identify the device or browser
"uid": "anonymous", // Mandatory , Current logged in user id
"channel": "505c7c48ac6dc1edc9b08f21db5a571d", // Mandatory , Unique id of the channel(Channel ID)
"pdata": { // Mandatory
"id": "sunbird.portal", // Producer ID. For ex: For sunbird it would be "portal" or "genie"
"ver": "3.2.12", // Version of the App
"pid": "sunbird-portal.contentplayer" // Optional. In case the component is distributed, then which instance of that component
},
"contextRollup": { // Optional. Defines the content roll up data
"l1": "505c7c48ac6dc1edc9b08f21db5a571d"
},
"tags": [ // Mandatory ,Defines the tags data
""
],
"cdata": [], // Optional. Defines correlation data
"timeDiff": 0, // Optional. Defines the time difference
"objectRollup": {}, // Optional. Defines the object roll up data
"host": "", // Optional. Defines the from which domain content should be load
"endpoint": "", // Optional. Defines the end point
"userData": { // Mandatory , Defines the user data firstname & lastname
"firstName": "",
"lastName": ""
}
},
"config": { // Optional and has default values
"sideMenu": {
"showShare": true, // show/hide share button in side menu. default value is true
"showDownload": true, // show/hide download button in side menu. default value is true
"showReplay": true, // show/hide replay button in side menu. default value is true
"showExit": false, // show/hide exit button in side menu. default value is false
"showPrint": true // show/hide print button in side menu. default value is true
}
},
"metadata": {
name : "" // mandatory
identifier : "" // mandatory
streamingUrl : "" // mandatory(conditional optional based on artifactUrl)
artifactUrl : "" // mandatory(conditional optional based on streamingUrl)
isAvailableLocally : "" // optional
basePath : "" // mandatory (conditional optional based on isAvailableLocally)
baseDir : "" // mandatory (conditional optional based on isAvailableLocally)
},
}

Property name

Mandatory/Optional

Reason

Property name

Mandatory/Optional

Reason

Context

M

context data we are using telemetry events

mode

M

content play mode used in telemetry event

authToken