Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added "then" as per DOCS-729

...

Code Block
linenumberstrue
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:

KeyValueExampleNotes
urlA download URL for the file"www.brightsign.biz/images/myfeedpic1.jpg"Required – The item will be ignored if this value is not present.
mediumvideo | image | audio | document"video"Suggested – If the medium and type values are not present, the medium value will default to "image".
typevideo/*, audio/*, image/*, text/html, application/widget"video/*"Suggested – If the medium and type values are not present, the type value will default to "image/*".
durationThe 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".
titleThe value for the MRSS Title field"myfeedpic1"Optional
descriptionThe value for the MRSS Description field"$5.99"Optional
sizeThe size of the file in bytes"942061"Optional
guidA unique value for the file"ab05caf"Optional – When this value changes, the player will re-download the file.
mrssCustomFieldsAn 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:

KeyValueExampleNotes
titleA title for the feed"myfeed1"
 

ttlThe 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.

 

...