...
This page describes how to use two advanced BrightAuthor features: custom autorun plugins and parser scripts. These instructions assume a certain level of familiarity with BrightScript. This is not a comprehensive guide to writing custom scripts for BrightAuthor; rather, it is meant to provide a general outline and best practices for writing those scripts.
...
Overview
Plugins allow you to add script extensions to a standard presentation autorun. Plugins have two primary benefits over custom autoruns:
They can be easily inserted into multiple presentations, including newer and older versions of the same presentation
...
.
They are not dependent on a certain autorun or firmware version, greatly reducing the complexity involved in updating custom BrightScript deployments.
...
BrightAuthor Autorun Plugins
Note
BrightAuthor plugins can be added to presentations in BrightAuthor 3.7 or later.
To designate one or more custom plugins for a BrightAuthor presentation, navigate in BrightAuthor:
Navigate to File > Presentation Properties > Autorun.
...
Select the Add Script Plugin button
...
Give the plugin a name (which must be the same as the
<plugin_name>
described in the initialization function below),
...
Select the Browse button to locate and select a .brs file to use as a plugin.
Plugin Structure
Plug-in scripts must include an initialization function in the form of <plugin_name>_Initialize()
. This initialization function is passed three parameters:
...
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 |
---|---|---|---|
| A download URL for the file | "www.brightsign.biz/images/myfeedpic1.jpg" | Required – The item will be ignored if this value is not present. |
| video | image | audio | document | "video" | Suggested – If the |
| video/*, audio/*, image/*, text/html, application/widget | "video/*" | Suggested – If the |
| 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". |
| The value for the MRSS Title field | "myfeedpic1" | Optional |
| The value for the MRSS Description field | "$5.99" | Optional |
| The size of the file in bytes | "942061" | Optional |
| A unique value for the file | "ab05caf" | Optional – When this value changes, the player will re-download the file. |
| 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 |
---|---|---|---|
| A title for the feed | "myfeed1" | |
| 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 |