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

Get customer. Defaults to value set in options if available


customer

Set customer.


sessionToken

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


sessionToken

Set session token

Methods


fetchPreferences(callback)

Fetch user Preferences

Parameters:
Name Type Description
callback function
Inherited From:

getAssetInfo(assetId, callback)

Get the Asset Info

Parameters:
Name Type Description
assetId string
callback function
Overrides:

getCachedServerTime()

getCachedServerTime

Inherited From:
Returns:

getCachedServerTime

Type
number

getChannelInfo(channelId, callback)

Get the Channel Info

Parameters:
Name Type Description
channelId string

Channel to fetch from

callback function

Callback when entitlement is fetched

Overrides:

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

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 function

Callback when entitlement is fetched or an error occurs

Overrides:

getEPG(channelId, from, to, callback)

Get EPG

Parameters:
Name Type Description
channelId string
from number
to number
callback function
Overrides:

getNextProgram(programId, callback)

Get next program

Parameters:
Name Type Description
programId string
callback function
Overrides:

getPreferences(callback)

Get user preferences key/value pair of (audioLang, subtitlesLang)

Parameters:
Name Type Description
callback function
Overrides:

getPreviousProgram(programId, callback)

Get previous program

Parameters:
Name Type Description
programId string
callback function
Overrides:

getProgramInfo(channelId, date, callback [, programId])

Get the program based on EPG

Parameters:
Name Type Argument Description
channelId string
date Date
callback function
programId string <optional>
Overrides:

getServerTime(callback)

Get server time

Should return the exact servertime

Parameters:
Name Type Description
callback function

Callback when server time is fetched or an error occurs

Overrides:

getV2Entitlement(entitlementRequest, playRequest, callback, preEntitlement)

Get Entitlement version 2

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

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 function

Callback when entitlement is fetched or an error occurs

preEntitlement Entitlement

Previous Entitlement after error

Overrides:

login(username, password, callback, mfacode)

exposureLogin

Parameters:
Name Type Description
username string

username

password string

password

callback function

callback

mfacode string

mfacode

Overrides:

logout( [callback], sessionToken)

logout

Parameters:
Name Type Argument Description
callback Funktion <optional>
sessionToken string
Overrides:

savePreferences(preferences, callback)

Save user preferences (audioLang, subtitlesLang)

Parameters:
Name Type Description
preferences any

key/value pair of (audioLang, subtitlesLang)

callback function
Overrides:

syncServerTime(callback)

Sync localtime with servertime

Parameters:
Name Type Description
callback EntitlementEngine~getServerTimeCallback

Callback when localtime sync with servertime or an error occurs

Inherited From:

verifyEntitlement(assetId, playRequest [, callback])

verify the entitlement

Parameters:
Name Type Argument Description
assetId string
playRequest Object

playRequest

callback function <optional>
Overrides:

verifySession(okFn, nokFn)

Verifies if sessionToken is still valid

Parameters:
Name Type Description
okFn function

callback if session is ok

nokFn function

callback if session is not ok

Overrides:

Class: EricssonExposure

EricssonExposure


new EricssonExposure( [options])

Create EricssonExposure

Parameters:
Name Type Argument Description
options Object <optional>

Object of option names and values

Members


businessUnit

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


businessUnit

Set business unit


customer

Get customer. Defaults to value set in options if available


customer

Set customer.


sessionToken

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


sessionToken

Set session token

Methods


fetchPreferences(callback)

Fetch user Preferences

Parameters:
Name Type Description
callback function
Inherited From:

getAssetInfo(assetId, callback)

Get the Asset Info

Parameters:
Name Type Description
assetId string
callback function
Overrides:

getCachedServerTime()

getCachedServerTime

Inherited From:
Returns:

getCachedServerTime

Type
number

getChannelInfo(channelId, callback)

Get the Channel Info

Parameters:
Name Type Description
channelId string

Channel to fetch from

callback function

Callback when entitlement is fetched

Overrides:

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

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 function

Callback when entitlement is fetched or an error occurs

Overrides:

getEPG(channelId, from, to, callback)

Get EPG

Parameters:
Name Type Description
channelId string
from number
to number
callback function
Overrides:

getNextProgram(programId, callback)

Get next program

Parameters:
Name Type Description
programId string
callback function
Overrides:

getPreferences(callback)

Get user preferences key/value pair of (audioLang, subtitlesLang)

Parameters:
Name Type Description
callback function
Overrides:

getPreviousProgram(programId, callback)

Get previous program

Parameters:
Name Type Description
programId string
callback function
Overrides:

getProgramInfo(channelId, date, callback [, programId])

Get the program based on EPG

Parameters:
Name Type Argument Description
channelId string
date Date
callback function
programId string <optional>
Overrides:

getServerTime(callback)

Get server time

Should return the exact servertime

Parameters:
Name Type Description
callback function

Callback when server time is fetched or an error occurs

Overrides:

getV2Entitlement(entitlementRequest, playRequest, callback, preEntitlement)

Get Entitlement version 2

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

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 function

Callback when entitlement is fetched or an error occurs

preEntitlement Entitlement

Previous Entitlement after error

Overrides:

login(username, password, callback, mfacode)

exposureLogin

Parameters:
Name Type Description
username string

username

password string

password

callback function

callback

mfacode string

mfacode

Overrides:

logout( [callback], sessionToken)

logout

Parameters:
Name Type Argument Description
callback Funktion <optional>
sessionToken string
Overrides:

savePreferences(preferences, callback)

Save user preferences (audioLang, subtitlesLang)

Parameters:
Name Type Description
preferences any

key/value pair of (audioLang, subtitlesLang)

callback function
Overrides:

syncServerTime(callback)

Sync localtime with servertime

Parameters:
Name Type Description
callback EntitlementEngine~getServerTimeCallback

Callback when localtime sync with servertime or an error occurs

Inherited From:

verifyEntitlement(assetId, playRequest [, callback])

verify the entitlement

Parameters:
Name Type Argument Description
assetId string
playRequest Object

playRequest

callback function <optional>
Overrides:

verifySession(okFn, nokFn)

Verifies if sessionToken is still valid

Parameters:
Name Type Description
okFn function

callback if session is ok

nokFn function

callback if session is not ok

Overrides: