Overview
BrightSign’s OS version 8.2.72 and BrightAuthor:connected version 1.6.29 contain a new feature that lets users see and modify settings using the BSN.cloud Properties Panel or through the BSN.cloud API. To avoid backwards compatibility issues, the supervisor won't honor these settings unless it is first enabled in your custom Device Setup Package, custom presentation, or custom application/plugin.
This feature is natively supported and enabled in BrightAuthor:connected presentations using version 1.6.29 or later, but you must enable it if you are running custom scripts. The steps required to enable this feature are described below.
Pre-requisites
You must be using BSN.cloud
Minimum BrightAuthor:connected version: 1.6.29
Minimum OS version: OS 8.2.72
ON THIS PAGE
Implementing the Settings Handler
To enable the Settings Handler from a custom Device Setup Package (not downloaded from BrightAuthor:connected):
- Include the code snippet from the Example Script section, below, in your Device Setup Package.
- In BrightAuthor:connected, navigate to the player’s network (under the Network tab on the top right). In this section, the player settings are available in the Properties panel.
To enable the Settings Handler from a custom presentation or custom application/plugin, include either the Example Script code snippet in your custom application/plugin/presentation or attach it to the presentation.
Once the device-side API is turned on, the player settings will be accessible in the Properties panel of BrightAuthor:connected (under the Network tab).
API Specification
This API specification is used by custom setup package scripts, custom presentation, or plugins, either invoked by BrightScript or JavaScript, to enable the “Settings Panel” (settings handler).
The base URL or player’s IPv4 IP address (the default port server is hosted on 8000) is http://localhost
GET /api/v1/system/supervisor/capabilities
Request Body
{ "script": { “type”: “Custom”, “version”: “10.0.60” // Can be any version in a x.x.x format. Used to communicate script version to BSN.cloud, displayed in “Settings Panel” } }
Response Body
Success: {"success":true}
Error: {"status”: <error status code>, “message”: <error message>}
Example Script
Partners who want to upgrade to use this feature must include the following code snippet in their BrightScript application/plugin.
localBaseUrl = "http://localhost" supervisorApiV1Route = "/api/v1" supervisorCapabilitiesUrlXfer = CreateObject("roUrlTransfer") supervisorCapabilitiesUrlXfer$ = localBaseUrl + supervisorApiV1Route + "/system/supervisor/capabilities" supervisorCapabilitiesUrlXfer.SetUrl(supervisorCapabilitiesUrlXfer$) supervisorCapabilitiesUrlXfer.SetTimeout(15000) supervisorCapabilitiesUrlXfer.SetProxyBypass(["127.0.0.1", "localhost"]) supervisorCapabilitiesUrlXfer.addHeader("Content-type", "application/json") script = CreateObject("roAssociativeArray") scriptType$ = "Custom" version$ = "10.0.60" ' current autorun script version script.AddReplace("type", scriptType$) script.AddReplace("version", version$) body = {} body.AddReplace("script", script) stringifiedJson = FormatJson(body) rc = supervisorCapabilitiesUrlXfer.PostFromString(stringifiedJson) if rc = 200 then print "===settings handler enabled" else print "===failed to start settings handler, error code:";rc end if
Caveats
The settings handler can override custom settings applied by the setup script.
Edits to the property sheet settings in the interface will not be applied on the device side unless the code snippet above is added to the runtime application (not the setup application) or it is added as a plugin to the custom presentation (not the setup application).