Class: EricssonExposure

EricssonExposure


new EricssonExposure( [options])

EricssonExposure EntitlementEngine

Parameters:
Name Type Argument Description
options Object <optional>

Object of option names and values

Extends

Members


businessUnit

Get business unit. Defaults to value set in options if available


businessUnit

Set business unit


customer

Set customer.


customer

Get customer. Defaults to value set in options if available


requestHeaders

Get Play request headers. Including apiKey if set


sessionToken

Set session token


sessionToken

Get session token. Defaults to value set in options if available

Methods


getAssetMetadata_(assetId, callback)

Get asset metadata

Parameters:
Name Type Description
assetId String

Asset to fetch metadata for

callback function

Callback when fetching has completed


getEntitlement(EntitlementRequest, Playrequest, callback)

Get Entitlement

Called by the player to get an entitlement. Entitlement requests contain an assetId and an optional programId.
If the programId exists, the assetId is the channelId. if the programId doesn't exist the assetId is the assetId.

The callback should be called when the requests completes, if it fails it should contain an EntitlementError
Exception object as it's second parameter.

if it succeeds it should return the Entitlement as the first parameter.

The Entitlement should contain the following parameters:

playToken - Playtoken required for drm
mediaLocator - URL of playlist file (for example for dash or hls playback) or mediaId for flash playback.

Parameters:
Name Type Description
EntitlementRequest EntitlementRequest

Entitlement request to execute

Playrequest Object

Playrequest object containing information about the required
attributes of the entitlement (e.g. { drm: 'EDRM', 'format': 'HLS' }

callback

callback Callback when entitlement is fetched or an error occurs

Overrides:

getProgram_(channelId, programId, playRequest [, callback])

Get program entitlement

Parameters:
Name Type Argument Description
channelId String

Channel to fetch from

programId String

Program to fetch

playRequest Object

Playrequest payload

callback function <optional>

Callback when entitlement is fetched


getProgramInfo(channelId, date, callback)

Get the program based on EPG

Parameters:
Name Type Description
channelId
date
callback
Overrides:

getServerTime(callback)

Get server time

Should return the exact servertime

Parameters:
Name Type Description
callback

callback Callback when server time is fetched or an error occurs

Overrides: