Skip to content
On this page

HlsJs

1. Introduction

Integration information

get_customer_info

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

PropsTypeDescription
MERCHANT_IDStringCustomer ID
APP_IDStringApp ID
USER_IDStringUserId is allocated from the application side
SESSION_IDStringThe user's session is allocated by the application
CONTENT_URLStringLink of the content you want to watch
javascript
sigmaPlayer.loadSource('CONTENT_URL', {
  method: 'sigma',
});