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 callbackfunction - Inherited From:
-
getAssetInfo(assetId, callback)
-
Get the Asset Info
Parameters:
Name Type Description assetIdstring callbackfunction - Overrides:
-
getCachedServerTime()
-
getCachedServerTime
- Inherited From:
Returns:
getCachedServerTime
- Type
- number
-
getChannelInfo(channelId, callback)
-
Get the Channel Info
Parameters:
Name Type Description channelIdstring Channel to fetch from
callbackfunction 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 fileParameters:
Name Type Description entitlementRequestEntitlementRequest Entitlement request to execute
playRequestObject Playrequest object containing information about the required
attributes of the entitlement (e.g. { drm: 'EDRM', 'format': 'HLS' }callbackfunction Callback when entitlement is fetched or an error occurs
- Overrides:
-
getEPG(channelId, from, to, callback)
-
Get EPG
Parameters:
Name Type Description channelIdstring fromnumber tonumber callbackfunction - Overrides:
-
getNextProgram(programId, callback)
-
Get next program
Parameters:
Name Type Description programIdstring callbackfunction - Overrides:
-
getPreferences(callback)
-
Get user preferences key/value pair of (audioLang, subtitlesLang)
Parameters:
Name Type Description callbackfunction - Overrides:
-
getPreviousProgram(programId, callback)
-
Get previous program
Parameters:
Name Type Description programIdstring callbackfunction - Overrides:
-
getProgramInfo(channelId, date, callback [, programId])
-
Get the program based on EPG
Parameters:
Name Type Argument Description channelIdstring dateDate callbackfunction programIdstring <optional>
- Overrides:
-
getServerTime(callback)
-
Get server time
Should return the exact servertime
Parameters:
Name Type Description callbackfunction 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 fileParameters:
Name Type Description entitlementRequestEntitlementRequest Entitlement request to execute
playRequestObject Playrequest object containing information about the required
attributes of the entitlement (e.g. { drm: 'EDRM', 'format': 'HLS' }callbackfunction Callback when entitlement is fetched or an error occurs
preEntitlementEntitlement Previous Entitlement after error
- Overrides:
-
login(username, password, callback, mfacode)
-
exposureLogin
Parameters:
Name Type Description usernamestring username
passwordstring password
callbackfunction callback
mfacodestring mfacode
- Overrides:
-
logout( [callback], sessionToken)
-
logout
Parameters:
Name Type Argument Description callbackFunktion <optional>
sessionTokenstring - Overrides:
-
savePreferences(preferences, callback)
-
Save user preferences (audioLang, subtitlesLang)
Parameters:
Name Type Description preferencesany key/value pair of (audioLang, subtitlesLang)
callbackfunction - Overrides:
-
syncServerTime(callback)
-
Sync localtime with servertime
Parameters:
Name Type Description callbackEntitlementEngine~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 assetIdstring playRequestObject playRequest
callbackfunction <optional>
- Overrides:
-
verifySession(okFn, nokFn)
-
Verifies if sessionToken is still valid
Parameters:
Name Type Description okFnfunction callback if session is ok
nokFnfunction callback if session is not ok
- Overrides:
EMP Html5 Player 2