# Player

Sunbird [inQuiry Player](https://inquiry.sunbird.org/learn/product-and-developer-guide/question-set-player/architecture) is used for consuming the question set. The current player supports the following question types,

* Multiple Choice Question (MCQ)
* Multi-select Multiple Choice Question (MMCQ)
* Subjective Question (SA)

This Player is also known as Question Set Player or QuML Player.

## Question Set Player (QuML Player)

Question set player is a player provided by inQuiry to create engaging & inclusive experiences for end users consuming the question sets.

More details on the player can be found [here](https://inquiry.sunbird.org/capabilities-1#d-question-set-player-quml-player) and [here](https://inquiry.sunbird.org/learn/product-and-developer-guide/question-set-player).

Player architecture is as below,

<figure><img src="https://3506001968-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWu4HIWGkb7dD4y0Kup4W%2Fuploads%2F4YSViWvbckkB18bnUYzX%2Fimage.png?alt=media&#x26;token=8505fd85-ca6b-4254-9d35-e5f9fd33df4f" alt=""><figcaption></figcaption></figure>

Player Module is as detailed below,

<figure><img src="https://3506001968-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWu4HIWGkb7dD4y0Kup4W%2Fuploads%2F3vg1l2ZXS8JnAK7sivpT%2Fimage.png?alt=media&#x26;token=8149b940-67ea-4e0f-a7ae-8cedff5c43a8" alt=""><figcaption></figcaption></figure>

<details>

<summary>Additional details about the internals of the Player</summary>

* Player Module - Root module of the player library where all the components and services are imported
* Player Component - Base component of the Editor which consists of the sub components
  * Section Component - Handles different types of questions by using its sub components
    * Start Page Component - Provide instructions for exams
    * MCQ Component - for rendering multiple choice questions.
    * SA Component - for rendering short answer questions (subjective)
    * Alert Component - Showing feedback or solutions
  * End Page Component - Summary of exam
* Viewer Service - service layer that makes the API calls related to Player. For eg:- question list
* Telemetry Service - initialise the Telemetry SDK and prepare the telemetry events
  * Telemetry SDK - to sent out the telemetry events to external Telemetry Service

</details>

#### Question / QuestionSet Consumption flow

<figure><img src="https://3506001968-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWu4HIWGkb7dD4y0Kup4W%2Fuploads%2FTUcOfLCAqgQqhPwhKBXJ%2Fimage.png?alt=media&#x26;token=9d0cf128-d09a-4691-843e-2fd58f3c8c59" alt=""><figcaption><p>User attempting questions</p></figcaption></figure>

#### Code Structure

* [Repository](https://inquiry.sunbird.org/learn/product-and-developer-guide/question-set-player/source-code)
* Important Folder / Package structure

  ```
  - projects
  	- quml-demo-app [Sample application for library]
  	- quml-library [Contains library components and service]
  	- quml-player-wc [Application to generate web component]
  - web-component-examples [Contains sample projects]
  - web-component [Contains generated web component files]
  ```

#### Dependencies

Details are listed [here](https://inquiry.sunbird.org/use/learn-more/dependencies) for the below specified dependencies

* [Sunbird QuML Specification](https://quml.sunbird.org/)
* [Sunbird inQuiry Service](https://inquiry.sunbird.org/learn/product-and-developer-guide/quick-starter-guide/inquiry-components/inquiry-service)&#x20;
* Sunbird Telemetry

## APIs used by Player

APIs invoked from Player component is listed [here](https://inquiry.sunbird.org/learn/product-and-developer-guide/question-set-player/apis)
