Introduction
Currently, to play the contents we need to pass all the config data to the player. In this config there are some mandatory and options fields. This wiki explains those mandatory and optional fields.
- KN-63Getting issue details... STATUS
PDF player configuration
The following configuration is required to play the pdf content in player
Context:
Context contains the following properties:
Property name | Description | optional/Required | Comment | |
---|---|---|---|---|
1 | mode | To identify preview used by the user to play/edit/preview | Optional | Can be set it as preview from the player side |
2 | authToken | Auth key to make the api call | Optional | As we are not calling any api from player side authtoken property can be optional. |
3 | sid | User sessionId | Optional | Default can be set from player side |
4 | did | Unique id to identify the device | Optional | Default can be set from player side |
5 | uid | Current logged in user id | Optional | Default can be set from player side |
6 | channel | Unique id of the channel | Optional | This can be a optional and can be set it from player side a a default parameter. |
7 | pdata | producer id | Optional | Default can be set from player |
8 | contextRollup | Defines the content rollup data | Optional | Its a optional field in telemetry |
9 | objectRollup | Defines the content object data | Optional | Its a optional field in telemetry |
10 | tags | defines the tags data | Optional | Its a optional tags data |
11 | cdata | Defines the correlation data | Required | Correlation data requires for telemetry |
12 | timeDiff | It defines the time difference | Optional | This can be a optional field |
13 | host | Defines the from which domain content should be loaded | Optional | Default can be set from player side |
14 | endpoint | It defines the endpoint | Optional | This can be a optional |
15 | userData | Defines the user first name and last name | Optional | Default can be set from player side |
Sample context object:
{ "mode": "play", // To identify preview used by the user to play/edit/preview "authToken": "", // Auth key to make api calls "sid": "7283cf2e-d215-9944-b0c5-269489c6fa56", // User sessionid on portal or mobile "did": "3c0a3724311fe944dec5df559cc4e006", // Unique id to identify the device or browser "uid": "anonymous", // Current logged in user id "channel": "505c7c48ac6dc1edc9b08f21db5a571d", // Unique id of the channel(Channel ID) "pdata": { "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": { // Defines the content roll up data "l1": "505c7c48ac6dc1edc9b08f21db5a571d" }, "tags": [ // Defines the tags data "" ], "cdata": [], // Defines correlation data "timeDiff": 0, // Defines the time difference "objectRollup": {}, // Defines the object roll up data "host": "", // Defines the from which domain content should be load "endpoint": "", // Defines the end point "userData": { // Defines the user data firstname & lastname "firstName": "", "lastName": "" } }
2. Config
All the configuration can be set by default from player side so this config object can be optional
sample config data
"config": { "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 } }
3. Metadata
In metadata the following properties are mandatory.
Property name | Description | optional/Required | Comment |
---|---|---|---|
identifier | It is | Required | Its a unique content id so Its a required to log the telemetry and other data against contnet |
Name | It is | Required | Its a required to show the name of the pdf while loading the pdf. |
streamingUrl | It is | Required | It is required to load the pdf file from streaming url |