Pepper Class
_libs\Pepper.js:1
Pepper SDK is a collection of files that provide a wrapper for the Soap API used to communicate with MediaSignage servers. The SDK makes programming easier by abstracting some of the tedious tasks such as enumeration.
The msdb internal Database is the magic sauce as it maps against the actual mediaSERVER remote database via local generated handles (a.k.a IDs). Once a user saves the local configuration, the local Database is serialized and pushed onto the a remote mediaSERVER. This allows for the user to work offline without the need for constant network communication until a save is initiated.
The internal database is referenced as msdb in both code and documentation.
Library requirements: composition: x2js, jQuery inheritance: ComBroker
Constructor
Pepper
()
Object
Returns:
Pepper instance
Item Index
Methods
- _livePreviewGetLink
- announceTemplateViewerEdited
- appendScenePlayerBlock
- assignCampaignToBoard
- assignTemplateToTimeline
- assignViewersToTimelineChannels
- assignViewerToTimelineChannel
- calcTimelineTotalDuration
- ChangeBusinessName
- ChangePassword
- checkAndCreateCampaignTimelineScheduler
- createAccount
- createBoard
- createCampaign
- createCampaignTimelineScheduler
- createNewChannelPlayer
- createNewTemplate
- createNewTimeline
- createPseudoSceneID
- createScene
- createTimelineChannel
- createTimelineChannels
- createViewer
- dbConnect
- event
- formatObjectToSeconds
- formatSecondsToObject
- generateSceneId
- getAdPackContNames
- getAssignedViewerIdFromChannelId
- getBlockRecord
- getBlockTimelineChannelBlockLength
- getBoardFromCampaignBoard
- getBoardTemplateViewer
- GetBusinessUserInfo
- GetBusinessUserInfo
- GetBusinessUserInfo
- getCampaignIdFromCampaignBoardId
- getCampaignIdFromCampaignBoardId
- getCampaignIDs
- getCampaignPlayModeFromTimeline
- getCampaignRecord
- getCampaignsSchedules
- getCampaignTimelineChannelPlayerRecord
- getCampaignTimelineChannelRecord
- getCampaignTimelineIdOfSequencerIndex
- getCampaignTimelineRecord
- getCampaignTimelines
- getCampaignTimelineSequencerIndex
- getChannelBlocksIDs
- getChannelIdFromCampaignTimelineBoardViewer
- getChannelsOfTimeline
- getFirstBoardIDofCampaign
- getGlobalBoardRecFromTemplate
- getGlobalTemplateIdOfTimeline
- getLoader
- getLocalization
- getLocalizationNew
- getProofOfPlayStats
- getPseudoIdFromSceneId
- getResourceName
- getResourceNativeID
- getResourceRecord
- getResources
- getResourceType
- getSampleList
- getSampleList
- getSceneDuration
- getSceneMime
- getSceneNames
- getScenePlayerdata
- getScenePlayerdataBlock
- getScenePlayerdataDom
- getScenePlayerRecord
- getScenes
- getStationCampaignID
- getStationCampaignIDs
- getStationNameAsync
- getStationNameSync
- getStationRecord
- getStationRecord
- getStudioLiteURL
- getStudioProURL
- getTemplatesOfTimeline
- getTemplateViewersScreenProps
- getTimelineTotalDuration
- getTotalDurationOfBlocks
- getUserData
- ieFixEscaped
- injectPseudoScenePlayersIDs
- livePreviewCampaign
- livePreviewScene
- livePreviewTimeline
- populateBoardTemplate
- populateBoardTemplate
- removeAllBoards
- removeAllScenePlayersWithResource
- removeBlockFromTimelineChannel
- removeBlocksFromTimelineChannel
- removeBlocksWithResourceID
- removeBlocksWithSceneID
- removeBoardTemplate
- removeBoardTemplateFromTimeline
- removeBoardTemplateViewer
- removeBoardTemplateViewers
- removeCampaign
- removeCampaignBoard
- removeChannelFromTimeline
- removeResource
- removeResourceFromBlockCollectionInScenes
- removeResourceFromBlockCollectionsInChannel
- removeScene
- removeSceneFromBlockCollectionsInChannels
- removeSceneFromBlockCollectionWithSceneId
- removeScenePlayer
- removeSchedulerFromTime
- removeStation
- removeTimelineBoardViewerChannel
- removeTimelineBoardViewerChannels
- removeTimelineFromCampaign
- removeTimelineFromSequences
- requestData
- restoreScenesWithPlayersIDs
- save
- sendCommand
- sendEvent
- sendLocalEventGPS
- sendSnapshot
- setBlockRecord
- setBlockTimelineChannelBlockLength
- setBoardTemplateViewer
- setCampaignRecord
- setCampaignsSchedule
- setCampaignTimelineChannelPlayerRecord
- setCampaignTimelineChannelRecord
- setCampaignTimelineRecord
- setCampaignTimelineSequencerIndex
- setResourceRecord
- setSceneDuration
- setScenePlayerData
- setScenePlayerdataBlock
- SetStationCampaignID
- setStationName
- setStationServerMode
- setTimelineTotalDuration
- sterilizePseudoId
- stripPlayersID
- stripScenePlayersIDs
- updateTemplateViewerOrder
- uploadResources
- xmlToStringIEfix
Events
- Pepper.BLOCK_LENGTH_CHANGED static
- Pepper.NEW_CAMPAIGN_CREATED static
- Pepper.NEW_CHANNEL_ADDED static
- Pepper.NEW_CHANNEL_CREATED static
- Pepper.NEW_PLAYER_CREATED static
- Pepper.NEW_TEMPLATE_CREATED static
- Pepper.NEW_TIMELINE_CREATED static
- Pepper.REMOVE_TIMELINE_CHANNEL_BLOCK static
- Pepper.SAVE_TO_SERVER static
- Pepper.TIMELINE_DELETED static
- Pepper.TIMELINE_LENGTH_CHANGED static
- Pepper.TIMELINE_LENGTH_CHANGED static
- Pepper.TIMELINE_LENGTH_CHANGED static
- Pepper.TIMELINE_SCHEDULE_DELETED static
Methods
_livePreviewGetLink
-
i_playerParams -
i_bannerMode
Build URL for player preview using supplied player parameters
Parameters:
-
i_playerParamsString -
i_bannerModeNumber
Returns:
url
announceTemplateViewerEdited
-
i_campaign_timeline_board_template_id
Announce via event that a template view (screen layout) has been edited
Parameters:
-
i_campaign_timeline_board_template_idNumber
appendScenePlayerBlock
-
i_scene_id -
i_player_data
append scene player block to pepper player_data table
Parameters:
-
i_scene_idNumber -
i_player_dataXML
assignCampaignToBoard
-
i_campaign_id -
i_board_id
Assign a campaign to a board, binding the to by referenced ids
Parameters:
-
i_campaign_idNumberthe campaign id to assign to board
-
i_board_idNumberthe board id to assign to campaign
Returns:
campain_board_id
assignTemplateToTimeline
-
i_campaign_timeline_id -
i_board_template_id -
i_campaign_board_id
Bind the template (screen division template)to the specified timeline (i_campaign_timeline_id). We need to also provide the board_template_id (screen template of the global board) as well as the campaign's board_id to complete the binding
Parameters:
-
i_campaign_timeline_idNumberto assign to template
-
i_board_template_idNumberis the global board id (does not belong to campaign) to assign to the template
-
i_campaign_board_idNumberis the campaign specific board id that will be bound to the template
Returns:
campaign_timeline_board_template_id
assignViewersToTimelineChannels
-
i_campaign_timeline_board_template_id -
i_viewers -
i_channels
Assign viewers (screen divisions) on the timeline to channels, so we get one viewer per channel
Parameters:
-
i_campaign_timeline_board_template_idNumber -
i_viewersObjecta json object with all viewers
-
i_channelsArraya json object with all channels
Returns:
none
assignViewerToTimelineChannel
-
i_campaign_timeline_board_template_id -
i_viewers -
i_channels
Assign viewer (screen division) on the timeline to channel
Parameters:
-
i_campaign_timeline_board_template_idNumber -
i_viewersObjecta json object with all viewers
-
i_channelsArraya json object with all channels
Returns:
none
calcTimelineTotalDuration
-
i_campaign_timeline_id
Update a timeline's duration which is set as the total sum of all blocks within the longest running channel
Parameters:
-
i_campaign_timeline_idNumber
Returns:
none
ChangeBusinessName
-
i_callBack
Get business user info
Parameters:
-
i_callBackFunction
ChangePassword
-
i_callBack
Get business user info
Parameters:
-
i_callBackFunction
checkAndCreateCampaignTimelineScheduler
-
i_campaign_id
Check that every timeline within a campaign has a scheduler table entry, if not, create one with default values
Parameters:
-
i_campaign_idNumber
Returns:
none
createAccount
-
i_callBack
Create a new mediaCLOUD account
Parameters:
-
i_callBackFunction
createBoard
-
i_boardName -
i_width -
i_height
Create a new board, also known as Screen (screen divisions reside inside the board as viewers)
Parameters:
-
i_boardNameNumber -
i_widthNumberof the board
-
i_heightNumberof the board
Returns:
the board id
createCampaign
-
i_campaginName
Create a new campaign in the local database
Parameters:
-
i_campaginNameNumber
Returns:
campaign id created
createCampaignTimelineScheduler
-
i_campaign_id -
i_campaign_timeline_id
Create a campaign timelime scheduler record for new timeline
Parameters:
-
i_campaign_idNumber -
i_campaign_timeline_idNumber
Returns:
none
createNewChannelPlayer
-
i_campaign_timeline_chanel_id -
i_playerCode -
i_offset -
i_resourceID -
i_sceneID
Create a new player (a.k.a block) and add it to the specified channel_id
Parameters:
-
i_campaign_timeline_chanel_idNumberis the channel id assign player to
-
i_playerCodeNumberis a unique pre-set code that exists per type of block (see component list for all available code)
-
i_offsetNumberset in seconds of when to begin playing the content with respect to timeline_channel
-
i_resourceIDNumberoptional param used when creating a block with embedded resource (i.e.: video / image / swf)
-
i_sceneIDNumberoptional param used when creating a block with embedded scene
Returns:
campaign_timeline_chanel_player_id and campaign_timeline_chanel_player_data as json object
createNewTemplate
-
i_board_id -
i_screenProps
Create a new global template (screen and viewers) and assign the new template to the given global board_id
Parameters:
-
i_board_idNumber -
i_screenPropsObjectjson object with all the viewers and attributes to create in msdb
Returns:
returnData encapsulates the board_template_id and board_template_viewer_ids created
createNewTimeline
-
i_campaign_id
Create a new timeline under the specified campaign_id
Parameters:
-
i_campaign_idNumber
Returns:
campaign_timeline_id the timeline id created
createPseudoSceneID
-
getSceneIdFromPseudoId
Translate an injected id to a table_player_data scene id
Parameters:
-
getSceneIdFromPseudoIdNumber
Returns:
scene id
createScene
()
Number
Create a new Scene If mimetype was give as an argument and it's of format Json.xxxx (i.e.: Json.weather, Json.spreadsheet ...) add it to scene table as well
Returns:
scene player_data id
createTimelineChannel
-
i_campaign_timeline_id
Create channel and assign that channel to the specified timeline
Parameters:
-
i_campaign_timeline_idNumberthe timeline id to assign channel to
Returns:
createdChanels array of channel ids created
createTimelineChannels
-
i_campaign_timeline_id -
i_viewers
Create channels and assign these channels to the timeline
Parameters:
-
i_campaign_timeline_idNumberthe timeline id to assign channel to
-
i_viewersObjectwe use viewer as a reference count to know how many channels to create (i.e.: one per channel)
Returns:
createdChanels array of channel ids created
createViewer
-
board_template_id -
i_board_template_id -
i_props
Create a global viewer in an existing board_template
Parameters:
-
board_template_idNumber -
i_board_template_idNumber -
i_propsObject
Returns:
viewer id
dbConnect
-
i_user -
i_pass -
i_callBack
Authenticate through mediaSERVER
Parameters:
-
i_userString -
i_passString -
i_callBackFunction
Returns:
none
event
-
i_event -
i_context -
i_caller -
i_data
The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional.
Parameters:
-
i_eventEvent -
i_contextObject -
i_callerObject -
i_dataObject
Returns:
none.
event: function (i_event, i_context, i_caller, i_data) ); },
formatObjectToSeconds
-
i_object
Format an object to seconds
Parameters:
-
i_objectObjectwith hours minutes and seconds key / values
Returns:
formatSecondsToObject
-
i_totalSeconds
Format a seconds value into an object broken into hours / minutes / seconds
Parameters:
-
i_totalSecondsNumber
Returns:
generateSceneId
()
Number
Get a unique scene > player id
Returns:
Unique scene player id
getAdPackContNames
-
i_ad_local_content_id
Get station name from msdb (no remote server async)
Parameters:
-
i_ad_local_content_idNumber
Returns:
getAssignedViewerIdFromChannelId
-
i_campaign_timeline_channel_id
Get the assigned viewer id to the specified channel
Parameters:
-
i_campaign_timeline_channel_idNumber
Returns:
foundViewerID
getBlockRecord
-
i_block_id
Get a block's record using it's block_id
Parameters:
-
i_block_idObject
Returns:
recBlock
getBlockTimelineChannelBlockLength
-
i_campaign_timeline_chanel_player_id
Get a block's (a.k.a player) total hours / minutes / seconds playback length on the timeline_channel.
Parameters:
-
i_campaign_timeline_chanel_player_idNumber
Returns:
playbackLength as a json object with keys of hours minutes seconds
getBoardFromCampaignBoard
-
i_campaign_board_id
Get a campaign_board into it's matching pair in global boards.
Parameters:
-
i_campaign_board_idNumber
Returns:
board_id
getBoardTemplateViewer
-
i_board_template_viewer_id
Get a Board Template Viewer props
Parameters:
-
i_board_template_viewer_idNumber
Returns:
i_props
GetBusinessUserInfo
-
i_callBack
Get business user info
Parameters:
-
i_callBackFunction
GetBusinessUserInfo
-
i_callBack
Get business user info
Parameters:
-
i_callBackFunction
GetBusinessUserInfo
-
i_callBack
Get business user info
Parameters:
-
i_callBackFunction
getCampaignIdFromCampaignBoardId
-
i_campaign_board_id
Get i_campaign_board_id into campaign_id using local table_campaign_boards (not global boards)
Parameters:
-
i_campaign_board_idNumber
Returns:
campaign_id
getCampaignIdFromCampaignBoardId
-
i_campaign_board_id
Get i_campaign_id into campaign_board_id using local table_campaign_boards (not global boards)
Parameters:
-
i_campaign_board_idNumber
Returns:
campaign_id
getCampaignIDs
()
Array
Get a list of all campaigns per the account
Returns:
campaigns
getCampaignPlayModeFromTimeline
-
i_campaign_timeline_id
get a Campaign's play mode (sceduler / sequencer) from timeline id
Parameters:
-
i_campaign_timeline_idNumber
Returns:
play mode
getCampaignRecord
-
i_campaign_id
Get a campaign table record for the specified i_campaign_id.
Parameters:
-
i_campaign_idNumber
Returns:
foundCampaignRecord
getCampaignsSchedules
-
i_campaign_timeline_id
Get campaign schedule for timeline
Parameters:
-
i_campaign_timeline_idNumber
Returns:
schedule record
getCampaignTimelineChannelPlayerRecord
-
i_player_id
Get a player_id record from msdb by player_id primary key.
Parameters:
-
i_player_idNumber
Returns:
player record
getCampaignTimelineChannelRecord
-
i_channel_id
Get a channel_id record from table channels msdb by channel_id
Parameters:
-
i_channel_idNumber
Returns:
channel record
getCampaignTimelineIdOfSequencerIndex
-
i_campaign_id -
i_sequence_index
Get the timeline id of the specific sequencer index offset (0 based) under the specified campaign
Parameters:
-
i_campaign_idNumber -
i_sequence_indexNumber
Returns:
timeline_id
getCampaignTimelineRecord
-
i_campaign_timeline_id
Get a timeline record from msdb using i_campaign_timeline_id primary key.
Parameters:
-
i_campaign_timeline_idNumber
Returns:
player record
getCampaignTimelines
-
i_campaign_id
Get all timeline ids for specified campaign
Parameters:
-
i_campaign_idNumber
Returns:
timeline ids
getCampaignTimelineSequencerIndex
-
i_campaign_timeline_id
Get the sequence index of a timeline in the specified campaign
Parameters:
-
i_campaign_timeline_idNumber
Returns:
sequenceIndex
getChannelBlocksIDs
-
i_campaign_timeline_chanel_id
Get all the block IDs of a particular channel. Push them into an array so they are properly sorted by player offset time.
Parameters:
-
i_campaign_timeline_chanel_idNumber
Returns:
foundBlocks
getChannelIdFromCampaignTimelineBoardViewer
-
i_campaign_timeline_board_viewer_id -
i_campaign_timeline_id
Use a viewer_id to reverse enumerate over the mapping of viewers to channels via: campaign_timeline_viewer_chanels -> table_campaign_timeline_chanels so we can find the channel assigned to the viewer_id provided.
Parameters:
-
i_campaign_timeline_board_viewer_idNumber -
i_campaign_timeline_idNumber
Returns:
recCampaignTimelineViewerChanelsFound
getChannelsOfTimeline
-
i_campaign_timeline_id
Get all the campaign > timeline > channels ids of a timeline
Parameters:
-
i_campaign_timeline_idNumber
Returns:
channel ids
getFirstBoardIDofCampaign
-
i_campaign_id
Get the first board_id (output) that is assigned to the specified campaign_id
Parameters:
-
i_campaign_idNumber
Returns:
foundBoardID of the board, or -1 if none found
getGlobalBoardRecFromTemplate
-
i_campaign_timeline_board_template_id
Get a global board record (not the board that assigned to a campaign, but global). Keep in mind that we only give as an argument the campaign > timeline > board > template id, so we have to query it and find out to which global board its pointing so we can grab the correct record for the correct global board.
Parameters:
-
i_campaign_timeline_board_template_idNumberto reverse map into global board
Returns:
global board record;
getGlobalTemplateIdOfTimeline
-
i_campaign_timeline_id
Get all the global board template ids of a timeline
Parameters:
-
i_campaign_timeline_idNumber
Returns:
foundGlobalBoardTemplatesIDs global board template ids
getLoader
()
Object
Returns a reference to the Pepper loader
Returns:
reference to loader
getLocalization
-
i_command -
i_stationId -
i_callBack
Push a command to remote station
Parameters:
-
i_commandString -
i_stationIdNumber -
i_callBackFunction
getLocalizationNew
-
i_command -
i_stationId -
i_callBack
Push a command to remote station, this v2 has a fall back and returns null on fails
Parameters:
-
i_commandString -
i_stationIdNumber -
i_callBackFunction
getProofOfPlayStats
-
i_callBack -
i_year -
i_playerData
Get proof of play stats report
Parameters:
-
i_callBackFunction -
i_yearNumber -
i_playerDataNumber
Returns:
i_month clientId.
getPseudoIdFromSceneId
-
i_scene_id
Translate a scene id to its matching pseudo scene id
Parameters:
-
i_scene_idNumber
Returns:
pseudo id
getResourceName
-
i_resource_id
Get the name of a resource from the resources table using it's native_id
Parameters:
-
i_resource_idNumber
Returns:
resourceName
getResourceNativeID
-
i_resource_id
Get the native resource id from handle
Parameters:
-
i_resource_idNumber
Returns:
nativeID
getResourceRecord
-
i_resource_id
Get a resource record via its resource_id.
Parameters:
-
i_resource_idNumber
Returns:
foundResourceRecord
getResources
()
Array
Get all none deleted (!=3) resources per current account
Returns:
all records of all resources in current account
getResourceType
-
i_resource_id
Get the type of a resource (png/jpg...) for specified native_id
Parameters:
-
i_resource_idNumber
Returns:
resourceType
getSampleList
-
i_callBack
Get list of all create account samples, both lite and pro
Parameters:
-
i_callBackFunction
getSampleList
-
i_callBack
Get list of all create account samples, both lite and pro
Parameters:
-
i_callBackFunction
getSceneDuration
-
i_scene_id
get a scene's default length
Parameters:
-
i_scene_idNumber
Returns:
total seconds
getSceneMime
-
i_sceneID
Returns all scenes
Parameters:
-
i_sceneIDNumber
Returns:
scene names
getSceneNames
-
i_playerData
Returns all scenes
Parameters:
-
i_playerDataNumber
Returns:
scene names
getScenePlayerdata
-
i_scene_id
Get Scene player data
Parameters:
-
i_scene_idNumber
Returns:
XML scene player data
getScenePlayerdataBlock
-
i_scene_id -
i_player_data_id
get a scene block playerdata
Parameters:
-
i_scene_idNumber -
i_player_data_idNumber
Returns:
i_player_data_id
getScenePlayerdataDom
-
i_sceneID
Get Scene player data as dom
Parameters:
-
i_sceneIDNumber
Returns:
dom
getScenePlayerRecord
-
i_sceneID
Get Scene player record from player_data table
Parameters:
-
i_sceneIDNumber
Returns:
XML playerdata
getScenes
()
Object
Get all Scenes and convert them to dom objects returning a hash of object literals
Returns:
all scenes as objects
getStationCampaignID
-
i_native_station_id
Returns the campaign id that a station is bound to
Parameters:
-
i_native_station_idNumber
Returns:
campaign_id
getStationCampaignIDs
()
Array
Returns all of the campaign IDs that all stations belonging to account are associated with
Returns:
array of campaign IDs
getStationNameAsync
-
i_stationID -
i_callBack
Sync to pepper and get station name for station id, callback on server sync return
Parameters:
-
i_stationIDNumber -
i_callBackNumber
getStationNameSync
-
i_stationID
Get station name from msdb (no remote server async)
Parameters:
-
i_stationIDNumber
Returns:
stationName
getStationRecord
-
i_native_station_id
Returns the record for a station id
Parameters:
-
i_native_station_idNumber
Returns:
recBranchStation
getStationRecord
-
i_native_station_id -
record
Set a station record via object arg into msdb table_branch_stations
Parameters:
-
i_native_station_idNumber -
recordObject
getStudioLiteURL
()
String
Return the url address of StudioLite
Returns:
url address
getStudioProURL
()
String
Return the url address of StudioPro
Returns:
url address
getTemplatesOfTimeline
-
i_campaign_timeline_id
Get all the campaign > timeline > board > template ids of a timeline
Parameters:
-
i_campaign_timeline_idNumber
Returns:
template ids
getTemplateViewersScreenProps
-
i_campaign_timeline_id -
i_campaign_timeline_board_template_id
Build screenProps json object with all viewers and all of their respective attributes for the given timeline_id / template_id
Parameters:
-
i_campaign_timeline_idNumber -
i_campaign_timeline_board_template_idNumber
Returns:
screenProps all viewers and all their properties
getTimelineTotalDuration
-
i_campaign_timeline_id
Get a timeline's duration which is set as the total sum of all blocks within the longest running channel
Parameters:
-
i_campaign_timeline_idNumber
Returns:
length in seconds
getTotalDurationOfBlocks
-
i_blocks
Get the total duration in seconds of all given block ids
Parameters:
-
i_blocksArray
Returns:
totalChannelLength
getUserData
()
Object
Return all authenticated user data
Returns:
reference to all user data
ieFixEscaped
-
escapedHTML
"Good" old IE, always a headache, jQuery workarounds....
Parameters:
-
escapedHTMLString
Returns:
injectPseudoScenePlayersIDs
-
i_scene_id
Inject unique player ids for all players within a scene
Parameters:
-
i_scene_idNumber
livePreviewCampaign
-
i_campaignID -
i_bannerMode
Create a live preview URL for campaign
Parameters:
-
i_campaignIDNumber -
i_bannerModeNumber
Returns:
url
livePreviewScene
-
i_scene_id -
i_bannerMode
Create a live preview URL for a scene
Parameters:
-
i_scene_idNumber -
i_bannerModeNumber
Returns:
url
livePreviewTimeline
-
i_campaignID -
i_timelineID -
i_bannerMode
Create a live preview URL for campaign
Parameters:
-
i_campaignIDNumber -
i_timelineIDNumber -
i_bannerModeNumber
Returns:
url
populateBoardTemplate
-
i_campaign_timeline_board_template_id
Sample function to demonstrate how to enumerate over records to query related tables of a campaign
Parameters:
-
i_campaign_timeline_board_template_idNumber
Returns:
none
populateBoardTemplate
-
i_campaign_timeline_board_template_id
Sample function to demonstrate how to enumerate over records to query for specified template_id
Parameters:
-
i_campaign_timeline_board_template_idNumber
Returns:
none
removeAllBoards
()
Remove all boards in msdb
Returns:
none
removeAllScenePlayersWithResource
-
i_resource_id
Remove all scene players that use resources (3100 & 3130) and that include the specified resource id
Parameters:
-
i_resource_idNumber
removeBlockFromTimelineChannel
-
i_block_id
Remove a block (i.e.: player) from campaign > timeline > channel
Parameters:
-
i_block_idNumber
Returns:
none
removeBlocksFromTimelineChannel
-
i_block_id
Remove all blocks (i.e.: players) from campaign > timeline > channel
Parameters:
-
i_block_idNumber
Returns:
none
removeBlocksWithResourceID
-
i_resource_id
Remove blocks (a.k.a players) from all campaign that use the specified resource_id (native id)
Parameters:
-
i_resource_idNumber
Returns:
none
removeBlocksWithSceneID
-
i_scene_id
Remove blocks (a.k.a players) from all campaign timeline channels that use the specified scene_id
Parameters:
-
i_scene_idNumber
Returns:
none
removeBoardTemplate
-
i_campaign_timeline_board_template_id
Remove board template
Parameters:
-
i_campaign_timeline_board_template_idNumber
removeBoardTemplateFromTimeline
-
i_timeline_id
Remove board template from timeline
Parameters:
-
i_timeline_idNumber
Returns:
campaign_timeline_board_template_id
removeBoardTemplateViewer
-
i_board_template_id -
i_board_template_viewer_id
Remove board template viewer
Parameters:
-
i_board_template_idNumber -
i_board_template_viewer_idNumber
removeBoardTemplateViewers
-
i_board_template_id
Remove board template viewers
Parameters:
-
i_board_template_idNumber
Returns:
boardTemplateViewerIDs
removeCampaign
-
i_campaign_id
Remove a campaign record
Parameters:
-
i_campaign_idNumber
Returns:
none
removeCampaignBoard
-
i_campaign_id
Remove campaign board_id
Parameters:
-
i_campaign_idNumber
Returns:
none
removeChannelFromTimeline
-
i_channel_id
Remove a channel from a timeline
Parameters:
-
i_channel_idNumber
Returns:
status
removeResource
-
i_resource_id
Remove a timeline from a campaign.
Parameters:
-
i_resource_idNumber
Returns:
none
removeResourceFromBlockCollectionInScenes
-
i_resource_id
Remove all refernce to a resource id from within Scenes > BlockCollections that refer to that particulat resource id In other words, check all scenes for existing block collections, and if they refer to resource id, remove that entry
Parameters:
-
i_resource_idNumberresource id to search for and remove in all scenes > BlockCollections
removeResourceFromBlockCollectionsInChannel
-
i_resource_id
Remove the resource from any block collection which resides in campaign timeline channels that uses that resource in its collection list
Parameters:
-
i_resource_idNumber
Returns:
none
removeScene
()
Remove a scene
removeSceneFromBlockCollectionsInChannels
-
i_scene_id
Remove the scene from any block collection which resides in campaign timeline channels that uses that scene in its collection list
Parameters:
-
i_scene_idNumber
Returns:
none
removeSceneFromBlockCollectionWithSceneId
-
i_scene_id
Remove all refernce to a scene id from within Scenes > BlockCollections that refer to that particulat scene id In other words, check all scenes for existing block collections, and if they refer to scene_id, remove that entry
Parameters:
-
i_scene_idNumberscene id to search for and remove in all scenes > BlockCollections
removeScenePlayer
-
i_scene_id -
i_player_id
Remove specific player id (i.e.: block) from scene player_data
Parameters:
-
i_scene_idNumber -
i_player_idNumber
removeSchedulerFromTime
-
i_campaign_timeline_id
Remove a schedule from timeline
Parameters:
-
i_campaign_timeline_idNumber
Returns:
none
removeStation
-
i_station
Remove station, delete it from internal msdb and push to server on save
Parameters:
-
i_stationNumber
removeTimelineBoardViewerChannel
-
i_campaign_timeline_board_template_id
Remove the association between the screen division (aka viewer) and all channels that are assigned with that viewer
Parameters:
-
i_campaign_timeline_board_template_idNumber
Returns:
return the channel that was de-associated with viewer
removeTimelineBoardViewerChannels
-
i_campaign_timeline_board_template_id
Remove board template viewers
Parameters:
-
i_campaign_timeline_board_template_idNumber
Returns:
none
removeTimelineFromCampaign
-
i_campaign_timeline_id
Remove a timeline from a campaign.
Parameters:
-
i_campaign_timeline_idNumber
Returns:
none
removeTimelineFromSequences
-
i_timeline_id
Remove a timeline from sequences
Parameters:
-
i_timeline_idNumber
Returns:
none
requestData
-
i_callback
Sync internal msdb to remote mediaSERVER account
Parameters:
-
i_callbackFunction
restoreScenesWithPlayersIDs
()
When we remove scene player ids we actually store them aside so we can restore them back after a save as the remote server expects a scene's player_data to have no player ids on its scene player_data
save
()
Serialize the local msdb and push to remote server
Returns:
none
sendCommand
-
i_command -
i_stationId -
i_callBack
Push a command to remote station
Parameters:
-
i_commandString -
i_stationIdNumber -
i_callBackFunction
sendEvent
-
i_eventName -
i_stationId -
i_callBack
Push an event to remote station
Parameters:
-
i_eventNameString -
i_stationIdNumber -
i_callBackFunction
sendLocalEventGPS
-
i_mode -
i_stationId -
i_lat -
i_lng -
i_callBack
Push an event to a local station / server for Location based content, see parms for details Keep in mind this supports both local and remote events
Parameters:
-
i_modeStringlocal or remote
-
i_stationIdNumber -
i_latNumber -
i_lngNumber -
i_callBackFunction
Returns:
{String) short url
sendSnapshot
-
i_fileName -
i_quality -
i_stationId -
i_callBack
Send remote command to retrieve snapshot of a running station
Parameters:
-
i_fileNameString -
i_qualityNumber -
i_stationIdNumber -
i_callBackFunction
Returns:
image path url
setBlockRecord
-
i_block_id -
i_key -
i_value
Set a block's record using key value pair The method uses generic key / value fields so it can set any part of the record.
Parameters:
-
i_block_idNumber -
i_keyString -
i_valueNumber
Returns:
none
setBlockTimelineChannelBlockLength
-
i_campaign_timeline_chanel_player_id -
i_hours -
i_minutes -
i_seconds
Set a block (a.k.a player) on the timeline_channel to a specified length in total seconds.
Parameters:
-
i_campaign_timeline_chanel_player_idNumber{string} plyer / block id
-
i_hoursNumbertotal hours to play
-
i_minutesNumbertotal minutes to play
-
i_secondsNumbertotal seconds to play
Returns:
none
setBoardTemplateViewer
-
i_board_template_viewer_id
Set a Board Template Viewer props
Parameters:
-
i_board_template_viewer_idNumber
Returns:
i_props
setCampaignRecord
-
i_campaign_id -
i_key -
i_value
Set a campaign table record for the specified i_campaign_id. The method uses generic key / value fields so it can set any part of the record.
Parameters:
-
i_campaign_idNumber -
i_keyObject -
i_valueString
Returns:
foundCampaignRecord
setCampaignsSchedule
-
i_campaign_timeline_id -
i_key -
i_value
Get campaign schedule for timeline
Parameters:
-
i_campaign_timeline_idNumber -
i_keyObject -
i_valueObject
setCampaignTimelineChannelPlayerRecord
-
i_player_id -
i_key -
i_value
Set a player_id record in msdb on key with value The method uses generic key / value fields so it can set any part of the record.
Parameters:
-
i_player_idNumber -
i_keyObject -
i_valueObject
Returns:
none
setCampaignTimelineChannelRecord
-
i_channel_id -
i_key -
i_value
Set a channel_id record in channels table using key and value The method uses generic key / value fields so it can set any part of the record.
Parameters:
-
i_channel_idNumber -
i_keyNumber -
i_valueString
Returns:
none
setCampaignTimelineRecord
-
i_player_id -
i_key -
i_value
Set a timeline records in msdb using i_campaign_timeline_id primary key. The method uses generic key / value fields so it can set any part of the record.
Parameters:
-
i_player_idNumber -
i_keyStringthe key to set
-
i_valueObjectthe value to set
Returns:
none
setCampaignTimelineSequencerIndex
-
i_campaign_id -
i_campaign_timeline_id -
i_sequenceIndex
Set the sequence index of a timeline in campaign. If timeline is not found in sequencer, we insert it with the supplied i_sequenceIndex
Parameters:
-
i_campaign_idNumber -
i_campaign_timeline_idNumber -
i_sequenceIndexNumberis the index to use for the timeline so we can playback the timeline in the specified index order
Returns:
none
setResourceRecord
-
i_resource_id -
i_key -
i_value
Set a resource record via its resource_id. The method uses generic key / value fields so it can set any part of the record.
Parameters:
-
i_resource_idNumber -
i_keyNumber -
i_valueString
Returns:
foundResourceRecord
setSceneDuration
-
i_scene_id -
hours -
minutes -
seconds
Set a scene's default length (can be overridden on timeline)
Parameters:
-
i_scene_idNumber -
hoursString -
minutesString -
secondsString
setScenePlayerData
()
Number
set entire scene playerdata
Returns:
scene player_data id
setScenePlayerdataBlock
-
i_scene_id -
i_player_data_id -
player_data
set a block id inside a scene with new player_data
Parameters:
-
i_scene_idNumber -
i_player_data_idNumber -
player_dataXML
SetStationCampaignID
-
i_native_station_id -
i_campaign_id
Set a station so its bound to campaign_id
Parameters:
-
i_native_station_idNumber -
i_campaign_idNumber
setStationName
-
branch_station_id -
i_callBack
save new station name
Parameters:
-
branch_station_idNumber -
i_callBackString
setStationServerMode
-
i_native_station_id -
i_mode
Set a station to server mode enable / disable
Parameters:
-
i_native_station_idNumber -
i_modeBoolean
setTimelineTotalDuration
-
i_campaign_timeline_id -
i_totalDuration
Set a timeline's total duration
Parameters:
-
i_campaign_timeline_idNumber -
i_totalDurationNumber
sterilizePseudoId
-
i_id
Sterilize pseudo id to scene id always returns scene_id as an integer rather pseudo id
Parameters:
-
i_idNumber
Returns:
i_id
stripPlayersID
()
Remove all player ids from i_domPlayerData
stripScenePlayersIDs
()
Remove all player ids from player_data inside a scene
updateTemplateViewerOrder
-
i_board_template_viewer_id -
i_view_order
Change a viewer's (aka screen division) order (layer) z-order
Parameters:
-
i_board_template_viewer_idNumber -
i_view_orderNumber
uploadResources
-
i_elementID
Upload new resources onto the remote server and return matching ids. The element id is of an HTML id of a multi-part upload element.
Parameters:
-
i_elementIDString
Returns:
list of resources created from newly attached files or empty array if not valid resource loaded
xmlToStringIEfix
-
i_domPlayerData
Returns this model's attributes as...
Parameters:
-
i_domPlayerDataObject
Returns:
xml string
Events
Pepper.BLOCK_LENGTH_CHANGED
final
static
Custom event fired when a block (ie Player on channel) changes it's total playback length
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.NEW_CAMPAIGN_CREATED
final
static
Custom event fired when a new campaign was created
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.NEW_CHANNEL_ADDED
final
static
Custom event fired when a new channel is added to an existing timeline
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.NEW_CHANNEL_CREATED
final
static
Custom event fired when a new channel was created
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.NEW_PLAYER_CREATED
final
static
Custom event fired when a new player (aka block) was created
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.NEW_TEMPLATE_CREATED
final
static
Custom event fired when a new template (aka screen division layout in global) was created
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.NEW_TIMELINE_CREATED
final
static
Custom event fired when a new timeline was created
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.REMOVE_TIMELINE_CHANNEL_BLOCK
final
static
Custom event fired when a block is removed from a timeline channel
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.SAVE_TO_SERVER
final
static
Custom event fired when saving to server
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.TIMELINE_DELETED
final
static
Custom event fired when a timeline is removed from campaign
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.TIMELINE_LENGTH_CHANGED
final
static
Custom event fired when a total timeline length (i.e.: channel content within specified timeline) has changed
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.TIMELINE_LENGTH_CHANGED
final
static
Custom event fired when a total timeline length (i.e.: channel content within specified timeline) has changed
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.TIMELINE_LENGTH_CHANGED
final
static
Custom event fired when a total timeline length (i.e.: channel content within specified timeline) has changed
Event Payload:
-
callerThis -
UNKNOWNEvent
Pepper.TIMELINE_SCHEDULE_DELETED
final
static
Custom event fired when a scheduale removed from timeline
Event Payload:
-
callerThis -
UNKNOWNEvent
digitalsignage.com - open source docs