HlsJs
1. Introduction
Integration information
Player Information:
- Player: SigmaPlayer.min.js
- Plugin: sigma_drm.js
2. Prerequire
Prerequisite
- Chrome: Version 57 or higher
- Safari: Version 11 or higher
- Firefox: Version 52 or higher
- MS Edge: Version 16 or higher
- Opera: Version 44 or higher
3. Integrate with Application
3.1. Integrate SigmaPlayer
html
<video id="player"></video>
<script src="SigmaPlayer.min.js"></script>
3.2. Before using player, config account information
javascript
const sigmaPlayer = new SigmaManager();
sigmaPlayer.config = {
enableWorker: true,
};
sigmaPlayer.mediaElm = document.getElementById('player');
sigmaPlayer.nativeClient = {
module: 'sigma_drm.js',
wasmBaseUrl:
window.location.protocol +
'//' +
window.location.hostname +
(window.location.port ? ':' + window.location.port : '') +
'/public/drm/', // path to static file
};
sigmaPlayer.appInfo = {
browser: 'Google-Chrome',
merchantId: 'MERCHANT_ID',
appId: 'APP_ID',
sessionId: 'SESSION_ID',
userId: 'USER_ID',
};
Integration Information
Props | Type | Description |
---|---|---|
MERCHANT_ID | String | Customer ID |
APP_ID | String | App ID |
USER_ID | String | UserId is allocated from the application side |
SESSION_ID | String | The user's session is allocated by the application |
CONTENT_URL | String | Link of the content you want to watch |
3.2. Initialization link source
javascript
sigmaPlayer.loadSource('CONTENT_URL', {
method: 'sigma',
});