skleraSDK

Library to communicate with the sklera Player

skleraSDK
Example
skleraSDK.loaded(function(screenData, appConfig) {
     console.log('SDK ready!');
     console.log(screenData);
     console.log('runtime config:', appConfig);
 })
Static Members
loaded(callback)
getConfig()
loadConfig(callback)
getScreenCommercialisation(callback)
writeData(key, data, callback)
readData(key, callback)
hideApp()
showApp()
setFullscreen()
unsetFullscreen()
toggleFullscreen()
setAppWidgetOrder(orderPosition?)
pausePlayer()
resumePlayer()
logEvent(eventType, eventData, callback?)
getItems(callback)
getMediaItems(callback)
getCollectionData(collection, filter?, options?, callback)
getWidgetsByName(name, callback)
getWidgetList(callback)
overrideWidgetData(widgetId, data)
resetWidgetData(widgetId)
setPhilipsLed(color)
unsetPhilipsLed()
fetchRemoteData(url, config?, callback)
sendHttpRequest(url, config?, callback)
getCustomValue(key, callback)
setCustomValue(key, value, optionsOrScope, callback)
getChannelCategories(callback)
getScreenCategories(callback)
addScreenCategories(categoryIds, callback)
removeScreenCategories(categoryIds, callback)
setScreenCategories(categoryIds, callback)
clearScreenCategories(callback)
setScreenSystemValues(data, callback, key, value)
getCachedFile(id, callback)
cacheFile(opt, callback?)
getItemData(itemId, callback)
getFolderData(folderId, callback)
getDataURL(dataId, callback)
loadFont(fontId, fontName?, callback)
triggerTouchAction(widgetNameOrId, callback)
triggerTouchActionDirect(actions, callback)
resetSessionCountdown(callback)
setVirtualStandby(enabled, callback)
onCustomAppEvent(listener, cmdFilter?)
unsubscribeCustomAppEvent(listenerRef)
sendCustomAppMessage(cmd, data)
viewElement(nameIdOrQuery, options, callback)

requestCallback

This callback type is called requestCallback and is displayed as a global symbol.

requestCallback(errorResponse: string, responseData: string)

Type: Function

Parameters
errorResponse (string) Error Response. If null, Response is ok
responseData (string) Data

EventLogTypes

Event Log types

EventLogTypes

Type: string

Properties
TOUCH_ACTION_GENERIC (string) : log touch action: generic action
TOUCH_ACTION_SHOW_ELEMENT (string) : log touch action: show Element
ITEM_PLAYED (string) : log item played event
PLAYER_EVENT_ERROR (string) : log an error event; eventData {data}
PLAYER_EVENT_WARNING (string) : log a warning event; eventData {data}
PLAYER_EVENT_INFO (string) : log a info event; eventData {data}