1.6.2
Library to communicate with the sklera Player
skleraSDK.loaded(function(screenData, appConfig) {
console.log('SDK ready!');
console.log(screenData);
console.log('runtime config:', appConfig);
})
Get the current Settings for the app
any
:
appConfig
Hide this WebApp
Show this WebApp
Enter fullscreen mode for the app widget
Leave fullscreen mode for the app widget
Toggle fullscreen mode for the app widget
Pause Player
Resume Player
Log player touch or itemPlayed events (Player version > 3.9.36) Update: 18.08.2023 new generic player log types: PLAYER_EVENT_ERROR, PLAYER_EVENT_WARNING, PLAYER_EVENT_INFO
((EventLogTypes | string))
(any)
{Object} optional data, {itemId}
(any?)
any
Get Library Items
(requestCallback)
Get Downloaded Media Files
(requestCallback)
Get Library Documents (Database)
(string)
Collection-name
(Object?)
Mongo-DB Filter
(Object?)
Mongo-DB Options
(requestCallback)
Get Widgets by Name
(string)
Widget name
(requestCallback)
Get all Widgets
(requestCallback)
Disable LED of Philips 10BDL3051T
Fetch remote text data (json or xml) via http request (CORS disabled). Player Version > 3.7.26 required. May currently only work on linux players.
Promise<any>
Send HTTP request (CORS disabled). Player Version > 3.8.16 required.
(string)
Remote Url
(Object?)
optional config.method, config.headers, config.params
(requestCallback)
Promise<any>
Get CustomValue (Database) Player Version > 3.8.16 required.
(string)
CustomValue key name
(requestCallback)
any
Set CustomValue (Database) Player Version > 3.8.16 required.
Change 28.09.2021: Since SDK version 1.2.1 and Player Version 3.9.17: 3rd parameter can be an options object for setting permission level (public or private), example: {scope: 'screen', isPublic: false}
Get all Channel categories > 3.8.16 required.
(requestCallback)
Get Screen categories > 3.8.16 required.
(requestCallback)
Add Screen category > 3.8.16 required.
(requestCallback)
Remove Screen category > 3.8.16 required.
(requestCallback)
SET Screen categories > 3.8.16 required.
(requestCallback)
any
Clear all Screen categories > 3.8.16 required.
(requestCallback)
Set System value for screen > 3.8.16 required.
Get previous local cached file by id > 3.8.86 required.
(string)
file name
(requestCallback)
Cache/store a file locally > 3.8.86 required.
(object)
opt.url required, optional opt.id, opt.cacheDays, opt.override
(requestCallback?)
Get a data ressource URL of a local stored media item (image or video) by ID. Version > 3.8.86 required.
(string)
ID of library item
(requestCallback)
, data.url can be used in image or video tags as source
any
Get Folder data (subfolders and items) > 3.9.32 required.
(string)
(requestCallback)
Get the Data from a Data URL entry in the CMS via ID. >4.0 required
(string)
(requestCallback)
Get a data ressource URL of a local stored media item (image or video) by ID. Version > 3.8.86 required.
(string)
ID of font
(string?)
Font Family name
(requestCallback)
, data returns font-family name
Get public downlod link for item
(string)
(requestCallback)
Trigger touch action of an widget by name OR id in the running layout context. player version > 3.8.154 required.
(string)
name or ID of widget
(requestCallback)
EXPERIMENTAL - Trigger raw touch action; version > 3.9.9 required.
desc
TYPE SHOW_ELEMENT show element example
skleraSDK.triggerTouchActionDirect([{type: 'SHOW_ELEMENT', itemId: data.itemId, duration: 0}]);
TYPE WEBHOOK call webhook from player with public url of item
skleraSDK.triggerTouchActionDirect([{type: 'WEBHOOK', itemId: data.itemId, webhookUrl:'https://sklera.tv?image=__ITEM_URL__',webhookData:'{}',webhookType:'GET',webhookMode: 'CLIENT'}]);
webhookUrl: string url of resource
webhookType: string method of http request GET|PUT|POST|DELETE
webhookData: string JSON data for http request {key: value}
webhookHeader: string JSON http header data {key: value}
webhookMode: string [CLIENT|SERVER] defines http request origin (player or server)
itemId: string optional item id for url replacement
(array)
raw touch action config array
(requestCallback)
Resets the interactive session countdown of screen layouts (if available)
Background: When using HTML5 App this should be called every time the user touches (is active) in the app - our player can't detect touch/click events happening within the app.
(requestCallback)
Switch display panel on or off
(boolean)
true=display off
(requestCallback)
Play element on sklera Player / Playout-Widget
This callback type is called requestCallback
and is displayed as a global symbol.
Type: Function
Event Log types
Type: string
(string)
: log touch action: generic action
(string)
: log touch action: show Element
(string)
: log item played event
(string)
: log an error event; eventData {data}
(string)
: log a warning event; eventData {data}
(string)
: log a info event; eventData {data}