projects/reveldigital/player-client/src/lib/player-client.service.ts
Properties |
|
Methods |
|
Public callback | ||||||||
callback(...args: any[])
|
||||||||
This method allows the gadget to communicate with player scripting. If the appropriate scripting is in place in the currently running template, calling this method will initiate a callback which can be acted upon in player script. Example :
Parameters :
Returns :
void
|
Public finish |
finish()
|
Indicate to the player that this gadget has finished it's visualization. This allows the player to proceed with the next item in a playlist if applicable.
Returns :
void
|
Public Async getCommandMap |
getCommandMap()
|
Returns a map of commands currently active for this device.
Returns :
Promise<any>
Map of commands currently active for this device. |
Public Async getDevice |
getDevice()
|
Returns the device details associated with the player running the gadget or web app.
Returns :
Promise<IDevice | null>
Device details. |
Public Async getDeviceKey |
getDeviceKey()
|
Returns the unique Revel Digital device key associated with the device.
Returns :
Promise<string>
Device key |
Public Async getDeviceTime | ||||||||
getDeviceTime(date?: Date)
|
||||||||
Returns the current device time in ISO8601 format. Current device time is determined by the device timezone assigned to the device in the CMS.
Parameters :
Returns :
Promise<string>
Date/time in ISO8601 format |
Public Async getDeviceTimeZoneID |
getDeviceTimeZoneID()
|
Returns the timezone ID currently assigned to the device.
Returns :
Promise<string>
Timezone ID |
Public Async getDeviceTimeZoneName |
getDeviceTimeZoneName()
|
Returns the timezone name currently assigned to the device.
Returns :
Promise<string>
Timezone Name |
Public Async getDeviceTimeZoneOffset |
getDeviceTimeZoneOffset()
|
Returns the numerical offset from GMT of the timezone currently assigned to the device.
Returns :
Promise<number>
Timezone offset |
Public Async getHeight |
getHeight()
|
Returns the height of the visualization area.
Returns :
Promise<number | null>
Height of the visualization area |
Public Async getLanguageCode |
getLanguageCode()
|
Returns the language code of the language currently assigned to the device.
Returns :
Promise<string>
Language code |
Public getPrefs |
getPrefs()
|
Accessor method for the user preferences interface exposed by the Gadgets API. See https://developers.google.com/gadgets/docs/basic for more details on the Gadgets API. Example :
Returns :
gadgets.Prefs
Gadget API Prefs object |
Public Async getRevelRoot |
getRevelRoot()
|
Returns the root folder utilized by this player device.
Returns :
Promise<string>
Path to the root folder |
Public Async getSdkVersion |
getSdkVersion()
|
Returns the current SDK version.
Returns :
Promise<string>
SDK version |
Public Async getWidth |
getWidth()
|
Returns the width of the visualization area.
Returns :
Promise<number | null>
Width of the visualization area |
Public newEventSession | ||||||||
newEventSession(id?: string)
|
||||||||
A session is a way of grouping events together. Each event has an associated session ID. Session ID's are randomly generated and reset by subsequent calls to newEventSession(). Each call to track() will utilize the same session ID, until another call to newEventSession().
Parameters :
Returns :
void
|
Public sendCommand | ||||||||||||
sendCommand(name: string, arg: string)
|
||||||||||||
Send a command to the player device.
Parameters :
Returns :
void
|
Public sendRemoteCommand | ||||||||||||||||
sendRemoteCommand(deviceKeys: string[], name: string, arg: string)
|
||||||||||||||||
Send a command to any remote player with the supplied device key(s). Note: Remote commands can only be delivered to devices within the same account as the sender device.
Parameters :
Returns :
void
|
Public Async setPreference | ||||||||||||
setPreference(key: string, value: string | number | boolean)
|
||||||||||||
Set a preference value. Provides the ability to have the gadget present a UI for setting preferences. Only available during design time.
Parameters :
Returns :
any
|
Public timeEvent | ||||||||
timeEvent(eventName: string)
|
||||||||
Method for initiating a timed event. Timed events are useful for tracking the duration of an event and must be proceeded with a call to track(). Example :
Parameters :
Returns :
void
|
Public track | ||||||||||||
track(eventName: string, properties?: IEventProperties)
|
||||||||||||
Log an event for use with AdHawk analytics. Events are used for tracking various metrics including usage statistics, player condition, state changes, etc.
Parameters :
Returns :
void
|
Public onCommand$ |
Default value : new Subject<ICommand>()
|
Commands sent to this player. |
Public onReady$ |
Default value : new BehaviorSubject(false)
|
Signals the gadget has been loaded and is ready to start. |
Public onStart$ |
Default value : new Subject()
|
Signals the gadget has been started by the player. |
Public onStop$ |
Default value : new Subject()
|
Signals the gadgets has been stopped by the player. |