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_playerParams
String -
i_bannerMode
Number
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_id
Number
appendScenePlayerBlock
-
i_scene_id
-
i_player_data
append scene player block to pepper player_data table
Parameters:
-
i_scene_id
Number -
i_player_data
XML
assignCampaignToBoard
-
i_campaign_id
-
i_board_id
Assign a campaign to a board, binding the to by referenced ids
Parameters:
-
i_campaign_id
Numberthe campaign id to assign to board
-
i_board_id
Numberthe 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_id
Numberto assign to template
-
i_board_template_id
Numberis the global board id (does not belong to campaign) to assign to the template
-
i_campaign_board_id
Numberis 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_id
Number -
i_viewers
Objecta json object with all viewers
-
i_channels
Arraya 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_id
Number -
i_viewers
Objecta json object with all viewers
-
i_channels
Arraya 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_id
Number
Returns:
none
ChangeBusinessName
-
i_callBack
Get business user info
Parameters:
-
i_callBack
Function
ChangePassword
-
i_callBack
Get business user info
Parameters:
-
i_callBack
Function
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_id
Number
Returns:
none
createAccount
-
i_callBack
Create a new mediaCLOUD account
Parameters:
-
i_callBack
Function
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_boardName
Number -
i_width
Numberof the board
-
i_height
Numberof the board
Returns:
the board id
createCampaign
-
i_campaginName
Create a new campaign in the local database
Parameters:
-
i_campaginName
Number
Returns:
campaign id created
createCampaignTimelineScheduler
-
i_campaign_id
-
i_campaign_timeline_id
Create a campaign timelime scheduler record for new timeline
Parameters:
-
i_campaign_id
Number -
i_campaign_timeline_id
Number
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_id
Numberis the channel id assign player to
-
i_playerCode
Numberis a unique pre-set code that exists per type of block (see component list for all available code)
-
i_offset
Numberset in seconds of when to begin playing the content with respect to timeline_channel
-
i_resourceID
Numberoptional param used when creating a block with embedded resource (i.e.: video / image / swf)
-
i_sceneID
Numberoptional 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_id
Number -
i_screenProps
Objectjson 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_id
Number
Returns:
campaign_timeline_id the timeline id created
createPseudoSceneID
-
getSceneIdFromPseudoId
Translate an injected id to a table_player_data scene id
Parameters:
-
getSceneIdFromPseudoId
Number
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_id
Numberthe 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_id
Numberthe timeline id to assign channel to
-
i_viewers
Objectwe 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_id
Number -
i_board_template_id
Number -
i_props
Object
Returns:
viewer id
dbConnect
-
i_user
-
i_pass
-
i_callBack
Authenticate through mediaSERVER
Parameters:
-
i_user
String -
i_pass
String -
i_callBack
Function
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_event
Event -
i_context
Object -
i_caller
Object -
i_data
Object
Returns:
none.
event: function (i_event, i_context, i_caller, i_data) ); },
formatObjectToSeconds
-
i_object
Format an object to seconds
Parameters:
-
i_object
Objectwith hours minutes and seconds key / values
Returns:
formatSecondsToObject
-
i_totalSeconds
Format a seconds value into an object broken into hours / minutes / seconds
Parameters:
-
i_totalSeconds
Number
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_id
Number
Returns:
getAssignedViewerIdFromChannelId
-
i_campaign_timeline_channel_id
Get the assigned viewer id to the specified channel
Parameters:
-
i_campaign_timeline_channel_id
Number
Returns:
foundViewerID
getBlockRecord
-
i_block_id
Get a block's record using it's block_id
Parameters:
-
i_block_id
Object
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_id
Number
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_id
Number
Returns:
board_id
getBoardTemplateViewer
-
i_board_template_viewer_id
Get a Board Template Viewer props
Parameters:
-
i_board_template_viewer_id
Number
Returns:
i_props
GetBusinessUserInfo
-
i_callBack
Get business user info
Parameters:
-
i_callBack
Function
GetBusinessUserInfo
-
i_callBack
Get business user info
Parameters:
-
i_callBack
Function
GetBusinessUserInfo
-
i_callBack
Get business user info
Parameters:
-
i_callBack
Function
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_id
Number
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_id
Number
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_id
Number
Returns:
play mode
getCampaignRecord
-
i_campaign_id
Get a campaign table record for the specified i_campaign_id.
Parameters:
-
i_campaign_id
Number
Returns:
foundCampaignRecord
getCampaignsSchedules
-
i_campaign_timeline_id
Get campaign schedule for timeline
Parameters:
-
i_campaign_timeline_id
Number
Returns:
schedule record
getCampaignTimelineChannelPlayerRecord
-
i_player_id
Get a player_id record from msdb by player_id primary key.
Parameters:
-
i_player_id
Number
Returns:
player record
getCampaignTimelineChannelRecord
-
i_channel_id
Get a channel_id record from table channels msdb by channel_id
Parameters:
-
i_channel_id
Number
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_id
Number -
i_sequence_index
Number
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_id
Number
Returns:
player record
getCampaignTimelines
-
i_campaign_id
Get all timeline ids for specified campaign
Parameters:
-
i_campaign_id
Number
Returns:
timeline ids
getCampaignTimelineSequencerIndex
-
i_campaign_timeline_id
Get the sequence index of a timeline in the specified campaign
Parameters:
-
i_campaign_timeline_id
Number
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_id
Number
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_id
Number -
i_campaign_timeline_id
Number
Returns:
recCampaignTimelineViewerChanelsFound
getChannelsOfTimeline
-
i_campaign_timeline_id
Get all the campaign > timeline > channels ids of a timeline
Parameters:
-
i_campaign_timeline_id
Number
Returns:
channel ids
getFirstBoardIDofCampaign
-
i_campaign_id
Get the first board_id (output) that is assigned to the specified campaign_id
Parameters:
-
i_campaign_id
Number
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_id
Numberto 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_id
Number
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_command
String -
i_stationId
Number -
i_callBack
Function
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_command
String -
i_stationId
Number -
i_callBack
Function
getProofOfPlayStats
-
i_callBack
-
i_year
-
i_playerData
Get proof of play stats report
Parameters:
-
i_callBack
Function -
i_year
Number -
i_playerData
Number
Returns:
i_month clientId.
getPseudoIdFromSceneId
-
i_scene_id
Translate a scene id to its matching pseudo scene id
Parameters:
-
i_scene_id
Number
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_id
Number
Returns:
resourceName
getResourceNativeID
-
i_resource_id
Get the native resource id from handle
Parameters:
-
i_resource_id
Number
Returns:
nativeID
getResourceRecord
-
i_resource_id
Get a resource record via its resource_id.
Parameters:
-
i_resource_id
Number
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_id
Number
Returns:
resourceType
getSampleList
-
i_callBack
Get list of all create account samples, both lite and pro
Parameters:
-
i_callBack
Function
getSampleList
-
i_callBack
Get list of all create account samples, both lite and pro
Parameters:
-
i_callBack
Function
getSceneDuration
-
i_scene_id
get a scene's default length
Parameters:
-
i_scene_id
Number
Returns:
total seconds
getSceneMime
-
i_sceneID
Returns all scenes
Parameters:
-
i_sceneID
Number
Returns:
scene names
getSceneNames
-
i_playerData
Returns all scenes
Parameters:
-
i_playerData
Number
Returns:
scene names
getScenePlayerdata
-
i_scene_id
Get Scene player data
Parameters:
-
i_scene_id
Number
Returns:
XML scene player data
getScenePlayerdataBlock
-
i_scene_id
-
i_player_data_id
get a scene block playerdata
Parameters:
-
i_scene_id
Number -
i_player_data_id
Number
Returns:
i_player_data_id
getScenePlayerdataDom
-
i_sceneID
Get Scene player data as dom
Parameters:
-
i_sceneID
Number
Returns:
dom
getScenePlayerRecord
-
i_sceneID
Get Scene player record from player_data table
Parameters:
-
i_sceneID
Number
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_id
Number
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_stationID
Number -
i_callBack
Number
getStationNameSync
-
i_stationID
Get station name from msdb (no remote server async)
Parameters:
-
i_stationID
Number
Returns:
stationName
getStationRecord
-
i_native_station_id
Returns the record for a station id
Parameters:
-
i_native_station_id
Number
Returns:
recBranchStation
getStationRecord
-
i_native_station_id
-
record
Set a station record via object arg into msdb table_branch_stations
Parameters:
-
i_native_station_id
Number -
record
Object
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_id
Number
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_id
Number -
i_campaign_timeline_board_template_id
Number
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_id
Number
Returns:
length in seconds
getTotalDurationOfBlocks
-
i_blocks
Get the total duration in seconds of all given block ids
Parameters:
-
i_blocks
Array
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:
-
escapedHTML
String
Returns:
injectPseudoScenePlayersIDs
-
i_scene_id
Inject unique player ids for all players within a scene
Parameters:
-
i_scene_id
Number
livePreviewCampaign
-
i_campaignID
-
i_bannerMode
Create a live preview URL for campaign
Parameters:
-
i_campaignID
Number -
i_bannerMode
Number
Returns:
url
livePreviewScene
-
i_scene_id
-
i_bannerMode
Create a live preview URL for a scene
Parameters:
-
i_scene_id
Number -
i_bannerMode
Number
Returns:
url
livePreviewTimeline
-
i_campaignID
-
i_timelineID
-
i_bannerMode
Create a live preview URL for campaign
Parameters:
-
i_campaignID
Number -
i_timelineID
Number -
i_bannerMode
Number
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_id
Number
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_id
Number
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_id
Number
removeBlockFromTimelineChannel
-
i_block_id
Remove a block (i.e.: player) from campaign > timeline > channel
Parameters:
-
i_block_id
Number
Returns:
none
removeBlocksFromTimelineChannel
-
i_block_id
Remove all blocks (i.e.: players) from campaign > timeline > channel
Parameters:
-
i_block_id
Number
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_id
Number
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_id
Number
Returns:
none
removeBoardTemplate
-
i_campaign_timeline_board_template_id
Remove board template
Parameters:
-
i_campaign_timeline_board_template_id
Number
removeBoardTemplateFromTimeline
-
i_timeline_id
Remove board template from timeline
Parameters:
-
i_timeline_id
Number
Returns:
campaign_timeline_board_template_id
removeBoardTemplateViewer
-
i_board_template_id
-
i_board_template_viewer_id
Remove board template viewer
Parameters:
-
i_board_template_id
Number -
i_board_template_viewer_id
Number
removeBoardTemplateViewers
-
i_board_template_id
Remove board template viewers
Parameters:
-
i_board_template_id
Number
Returns:
boardTemplateViewerIDs
removeCampaign
-
i_campaign_id
Remove a campaign record
Parameters:
-
i_campaign_id
Number
Returns:
none
removeCampaignBoard
-
i_campaign_id
Remove campaign board_id
Parameters:
-
i_campaign_id
Number
Returns:
none
removeChannelFromTimeline
-
i_channel_id
Remove a channel from a timeline
Parameters:
-
i_channel_id
Number
Returns:
status
removeResource
-
i_resource_id
Remove a timeline from a campaign.
Parameters:
-
i_resource_id
Number
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_id
Numberresource 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_id
Number
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_id
Number
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_id
Numberscene 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_id
Number -
i_player_id
Number
removeSchedulerFromTime
-
i_campaign_timeline_id
Remove a schedule from timeline
Parameters:
-
i_campaign_timeline_id
Number
Returns:
none
removeStation
-
i_station
Remove station, delete it from internal msdb and push to server on save
Parameters:
-
i_station
Number
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_id
Number
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_id
Number
Returns:
none
removeTimelineFromCampaign
-
i_campaign_timeline_id
Remove a timeline from a campaign.
Parameters:
-
i_campaign_timeline_id
Number
Returns:
none
removeTimelineFromSequences
-
i_timeline_id
Remove a timeline from sequences
Parameters:
-
i_timeline_id
Number
Returns:
none
requestData
-
i_callback
Sync internal msdb to remote mediaSERVER account
Parameters:
-
i_callback
Function
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_command
String -
i_stationId
Number -
i_callBack
Function
sendEvent
-
i_eventName
-
i_stationId
-
i_callBack
Push an event to remote station
Parameters:
-
i_eventName
String -
i_stationId
Number -
i_callBack
Function
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_mode
Stringlocal or remote
-
i_stationId
Number -
i_lat
Number -
i_lng
Number -
i_callBack
Function
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_fileName
String -
i_quality
Number -
i_stationId
Number -
i_callBack
Function
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_id
Number -
i_key
String -
i_value
Number
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_id
Number{string} plyer / block id
-
i_hours
Numbertotal hours to play
-
i_minutes
Numbertotal minutes to play
-
i_seconds
Numbertotal seconds to play
Returns:
none
setBoardTemplateViewer
-
i_board_template_viewer_id
Set a Board Template Viewer props
Parameters:
-
i_board_template_viewer_id
Number
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_id
Number -
i_key
Object -
i_value
String
Returns:
foundCampaignRecord
setCampaignsSchedule
-
i_campaign_timeline_id
-
i_key
-
i_value
Get campaign schedule for timeline
Parameters:
-
i_campaign_timeline_id
Number -
i_key
Object -
i_value
Object
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_id
Number -
i_key
Object -
i_value
Object
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_id
Number -
i_key
Number -
i_value
String
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_id
Number -
i_key
Stringthe key to set
-
i_value
Objectthe 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_id
Number -
i_campaign_timeline_id
Number -
i_sequenceIndex
Numberis 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_id
Number -
i_key
Number -
i_value
String
Returns:
foundResourceRecord
setSceneDuration
-
i_scene_id
-
hours
-
minutes
-
seconds
Set a scene's default length (can be overridden on timeline)
Parameters:
-
i_scene_id
Number -
hours
String -
minutes
String -
seconds
String
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_id
Number -
i_player_data_id
Number -
player_data
XML
SetStationCampaignID
-
i_native_station_id
-
i_campaign_id
Set a station so its bound to campaign_id
Parameters:
-
i_native_station_id
Number -
i_campaign_id
Number
setStationName
-
branch_station_id
-
i_callBack
save new station name
Parameters:
-
branch_station_id
Number -
i_callBack
String
setStationServerMode
-
i_native_station_id
-
i_mode
Set a station to server mode enable / disable
Parameters:
-
i_native_station_id
Number -
i_mode
Boolean
setTimelineTotalDuration
-
i_campaign_timeline_id
-
i_totalDuration
Set a timeline's total duration
Parameters:
-
i_campaign_timeline_id
Number -
i_totalDuration
Number
sterilizePseudoId
-
i_id
Sterilize pseudo id to scene id always returns scene_id as an integer rather pseudo id
Parameters:
-
i_id
Number
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_id
Number -
i_view_order
Number
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_elementID
String
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_domPlayerData
Object
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:
-
caller
This -
UNKNOWN
Event
Pepper.NEW_CAMPAIGN_CREATED
final
static
Custom event fired when a new campaign was created
Event Payload:
-
caller
This -
UNKNOWN
Event
Pepper.NEW_CHANNEL_ADDED
final
static
Custom event fired when a new channel is added to an existing timeline
Event Payload:
-
caller
This -
UNKNOWN
Event
Pepper.NEW_CHANNEL_CREATED
final
static
Custom event fired when a new channel was created
Event Payload:
-
caller
This -
UNKNOWN
Event
Pepper.NEW_PLAYER_CREATED
final
static
Custom event fired when a new player (aka block) was created
Event Payload:
-
caller
This -
UNKNOWN
Event
Pepper.NEW_TEMPLATE_CREATED
final
static
Custom event fired when a new template (aka screen division layout in global) was created
Event Payload:
-
caller
This -
UNKNOWN
Event
Pepper.NEW_TIMELINE_CREATED
final
static
Custom event fired when a new timeline was created
Event Payload:
-
caller
This -
UNKNOWN
Event
Pepper.REMOVE_TIMELINE_CHANNEL_BLOCK
final
static
Custom event fired when a block is removed from a timeline channel
Event Payload:
-
caller
This -
UNKNOWN
Event
Pepper.SAVE_TO_SERVER
final
static
Custom event fired when saving to server
Event Payload:
-
caller
This -
UNKNOWN
Event
Pepper.TIMELINE_DELETED
final
static
Custom event fired when a timeline is removed from campaign
Event Payload:
-
caller
This -
UNKNOWN
Event
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:
-
caller
This -
UNKNOWN
Event
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:
-
caller
This -
UNKNOWN
Event
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:
-
caller
This -
UNKNOWN
Event
Pepper.TIMELINE_SCHEDULE_DELETED
final
static
Custom event fired when a scheduale removed from timeline
Event Payload:
-
caller
This -
UNKNOWN
Event