Skip to content

Latest commit

 

History

History
80 lines (61 loc) · 5.83 KB

File metadata and controls

80 lines (61 loc) · 5.83 KB

Architecture

This is the classic version of the asset player. Using this player, users can play the following asset types.

  • ECML
  • PDF
  • EPUB
  • HTML and H5P
  • Video (MP4, WebM)
  • Youtube

MIME Type

What is mime-type

MIME Types defines the what type of the content it is. According to the mimeType you can load the specific content launcher and play the different types of contents

Sample config to load the MIME types

mimetypes: [
    "application/vnd.ekstep.ecml-archive",
    "application/vnd.ekstep.html-archive",
    "application/vnd.ekstep.h5p-archive",
    "application/epub",
    "video/mp4",
    "application/pdf",
    "video/x-youtube",
    "video/webm",
    "audio/mp3"
]

Supported MIME Types are:

Content Type MIME Type
ECML application/vnd.ekstep.ecml-archive
HTML application/vnd.ekstep.html-archive
PDF application/pdf
Epub application/epub
H5P application/vnd.ekstep.h5p-archive
YOUTUBE video/x-youtube
WEBM video/Webm
MP4 video/mp4
EXTERNAL CONTENT text/x-url

Content Launchers

Content player v1 is able to play the different types of contents using the configuration. You just need to provide the mimeType and plugin launchers in config. Its capable to load the content launchers according to the mimeType

Sample config to launch the ECML content

"contentLaunchers": [ // content laucher plugins for specific content mimetypes
    { // Plugin used for ECML content to launch, It is default plugin
        "mimeType": 'application/vnd.ekstep.html-archive',
        "id": 'org.sunbird.htmlrenderer',
        "ver": 1.0,
        "type": 'plugin'
    }
]

White List Urls

Content player v1 will allows to play the external streaming url by adding the domain into the whiteListUrl config

Sample config to add white listed urls

whiteListUrl: [ 
    'self', 'https://.blob.core.windows.net/**',
    'https://ekstep-public-.s3-ap-south-1.amazonaws.com/**' 
]

Please refer to the config section of README.md file of the below git repository