Configuration
The QuML player is an angular library built with Angular version 12, and it exports some modules and components. It has a component that accepts input from the user. The followings are the list of all the configurations on which the QuML player works.
📔Component: quml-main-player
This is the main player Component that accepts some configurations (here playerConfig
) based on it will render the player.
While rendering the player it also emits some events such as playerEvent
and telemetryEvent
Let's deep dive into the player input configuration:
📋Input Config
1. Config - Required
This Required property from the playerConfig
provides the configuration for the player to enable/disable some functionalities.
Along with this it also provides the state of the content, if available.
Description of the properties for the config
Property | Default Value | Required | Description |
sideMenu.enable | true | false | To show/hide the sidebar menu / hamburger menu |
sideMenu.showShare | true | false | To enable the share functionality in a sidebar menu |
sideMenu.showDownload | true | false | To enable the Download functionality in a sidebar menu |
sideMenu.showExit | true | false | To enable the exit functionality in a sidebar menu (Mostly used in mobile application to exit the player) |
progressBar | [ ] | false | Previous saved state for progressBar. It is state object containing question and there associate answer status. |
questions | [ ] | false | Previously saved state for questions. Array of saved questions |
lastQuestionId | null | false | Question Identifier of last played content |
nextContent | null | false | Data of the next content to be play like name and identifier |
duration | 0 | false | Last player duration in miliseconds. |
traceId | null | false | To trace the error |
showWarningTimer | true | false | This will decide if the |
warningTime | 75 | false | Warning timer will start showing once the user finishes 75% (default) of the max time For eg, max time is 100 seconds, warning timer will start showing from the 75 seconds |
2. Context - (Optional)
This Required property from the playerConfig
provides the context to the player mostly in terms of the telemetry.
Along with this it also provides the state of the content, if available.
Description of the properties for the config
Property | Required | Description |
mode | true | It is |
sid | true | It is |
did | true | It is |
channel | true | It is |
pdata | true | It is an |
contextRollup | true | context Rollups upto level 4 |
tags | true | Encrypted dimension tags passed by respective channels |
authToken | false | It is |
threshold | false | Its a Threshold number to fetch the number of questions with question API |
cdata | false | Correlation data |
timeDiff | false | Last content playing duration |
objectRollup | false | Object Rollup up to level 4 |
host | false | It is |
endpoint | false | Telemetry API endpoint |
userData.firstName | false | User's first name |
userData.lastName | false | User's last name |
3. Metadata: Required
Following is the interface for the metadata:
The followings are some of the properties related to the question set response, it will have other properties of content as well.
Property | Description |
instructions | These are instructions that will be placed on the first page of the question set or the section. It has HTML code that can be directly painted on DOM |
showStartPage | This config is used to show or hide the start page in the question set |
timeLimits | This config used to show the maximum time to attempt the test with the warning time |
navigationMode | Navigation of the questionset such as Linear, non-linear |
maxScore | Total maxscore of the questionset |
showTimer | To show the timer in descending order |
name | Name of the Questionset |
description | Description of the questionset |
allowSkip | Config to tell the player if skipping the questions are allowed. If allowed then user can directly jump to any question, if cannot skip the question. |
primaryCategory | Primary Category of the questionset e.g. Practice Question Set |
mimeType | MimeType of the questionset which is |
maxAttempts | A maximum number of attempts one can take. It will be shown on the player. Once all the attempts are exhausted user cannot attempt questionset anymore |
showHints | Config to show/hide the hint button. By clicking on this button it will show solution page. |
showFeedback | Config to show/hide feedback page. If enabled it will show a feedback popup for correct and wrong answers. For a wrong answer, user can attempt the question again by clicking on ‘Try Again’ button This config uses different color coding for the question-set list |
requiresSubmit | Config to show/hide the submit button. This is to show submit page where all the questions are listed and user can navigate to skipped or attempted questions directly from this page before submitting the answers. |
showSolutions | Config to show/hide the solution button |
shuffle | Config to enable/disable the shuffle in questions |
▶️Screenshots:
Refer to the following screenshots for more understanding:
Last updated