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 |
PDF Player behaviour if the following configurations are not passed:
1. Context
pdata: If we not pass the pdata the pdata will not logged in telemetry
Sample telemetry data without pdata
{"eid":"INTERACT","ets":1662988243357,"ver":"3.0","mid":"INTERACT:fcd57afb91574c6526058b5aa68403de","actor":{"id":"3c0a3724311fe944dec5df559cc4e006","type":"User"},"context":{"channel":"505c7c48ac6dc1edc9b08f21db5a571d","env":"contentplayer","sid":"7283cf2e-d215-9944-b0c5-269489c6fa56","did":"3c0a3724311fe944dec5df559cc4e006","cdata":[{"id":"XBfyG8Hd4lF7SKSM9Rvj5CdoXKfntwEd","type":"ContentSession"},{"id":"bFLHgkI1NTnhl1IOzS2nch0bH3EkpFkE","type":"PlaySession"},{"id":"2.0","type":"PlayerVersion"}],"rollup":{"l1":"505c7c48ac6dc1edc9b08f21db5a571d"},"uid":"anonymous"},"object":{"id":"do_31291455031832576019477","ver":"undefined","type":"Content","rollup":{}},"tags":[""],"edata":{"type":"TOUCH","subtype":"","id":"next","pageid":"2"}}
contextRollup: If we not pass the pdata the pdata will not logged in telemetry
Sample content object telemetry data without rollup
"context": { .... .... "rollup": {}, "uid": "anonymous" }
sid, did, uid, channel: If we not pass the pdata the pdata will not logged in telemetry
Sample telemetry data without pdata:
{"eid":"INTERACT","ets":1662989700604,"ver":"3.0","mid":"INTERACT:df20f452603133275899885c89826a0a","actor":{"id":"ac7fa5a7da1312d0603d351c941a2813","type":"User"},"context":{"pdata":{"id":"sunbird.portal","ver":"3.2.12","pid":"sunbird-portal.contentplayer"},"env":"contentplayer","did":"ac7fa5a7da1312d0603d351c941a2813","cdata":[{"id":"QtPz7hI6rQjEqosRF3Shlwx9jhMOSzGs","type":"ContentSession"},{"id":"ikwUrq2L04DcojCek0Remi2nvmlbkJwr","type":"PlaySession"},{"id":"2.0","type":"PlayerVersion"}],"rollup":{"l1":"505c7c48ac6dc1edc9b08f21db5a571d"}},"object":{"id":"do_31291455031832576019477","ver":"undefined","type":"Content","rollup":{}},"tags":[""],"edata":{"type":"TOUCH","subtype":"","id":"next","pageid":"2"}}
tags: If we not pass the tags the empty tags will log in telemetry
Sample telemetry data without tags:
"context": { ... "tags": [],
objectRollup: If we not pass the pdata the pdata will not logged in telemetry
Sample content object telemetry data without rollup
"context: { }, "object": { "id": "do_31291455031832576019477", "ver": "undefined", "type": "Content", "rollup": {} },
userData: If we pass the userData, it will show in endpage.
If we not send - it will not show.
2. Config
sideMenu
: If we not pass the side menu object for pdf config - the default the following menu will show in sidemenu
Share
Download
Print