...
Code Block | ||
---|---|---|
| ||
Function pizza_ProcessEvent(event As Object) print "pizza_ProcessEvent - entry" print "type of m is ";type(m) print "type of event is ";type(event) if type(event) = "roAssociativeArray" then if type(event["EventType"]) = "roString" then if event["EventType"] = "SEND_PLUGIN_MESSAGE" then if event["PluginName"] = "Pizza" then pluginMessage$ = event["PluginMessage"] print "received pluginMessage ";pluginMessage$ return true endif endif endif endif return false End Function |
Sending a Plugin Message
The following example code shows how to write a script that sends a message string to trigger a Plugin Message event.
...
Each associative array consists of one or more key-value pairs. All values must be strings–including numerical values. The following table outlines accepted key-value pairs:
Key | Value | Example | Notes |
---|---|---|---|
url | A download URL for the file | "www.brightsign.biz/images/myfeedpic1.jpg" | Required – The item will be ignored if this value is not present. |
medium | video | image | audio | document | "video" | Suggested – If the medium and type values are not present, the medium value will default to "image". |
type | video/*, audio/*, image/*, text/html, application/widget | "video/*" | Suggested – If the medium and type values are not present, the type value will default to "image/*". |
duration | The display duration in seconds | "30" | Optional – This value applies to images only, and has no effect on other media types. If not specified, this value defaults to "15". |
title | The value for the MRSS Title field | "myfeedpic1" | Optional |
description | The value for the MRSS Description field | "$5.99" | Optional |
size | The size of the file in bytes | "942061" | Optional |
guid | A unique value for the file | "ab05caf" | Optional – When this value changes, the player will re-download the file. |
mrssCustomFields | An associative array of arbitrary key-value pairs | {key1:"custom field A", key2:"custom field B"} | Optional – Use this associative array to include custom MRSS fields. |
Metadata Specification
The metadata
object is an empty associative array when the parser subroutine is entered. This associative array can accept optional key-value pairs that represent properties for the entire feed. All values must be strings–including numerical values. The following table outlines accepted key-value pairs:
Key | Value | Example | Notes |
---|---|---|---|
title | A title for the feed | "myfeed1" |
ttl | The time-to-live in minutes | "5" | This value represents how long the feed will be stored (whether it's utilized by the presentation or not) before being refreshed. The user will also set an Update Interval when adding the Data Feed to the BrightAuthor presentation; if the ttl value is specified, the presentation will use the lesser of the two values to determine the refresh frequency. |
...