BSN.Cloud for Partners
Applying Settings in the Properties Panel
9min
newer brightauthor\ connected and brightsignos versions contain a 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 a 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 prerequisites you must be using bsn cloud minimum brightauthor\ connected version 1 6 29 minimum brightsignos version os 8 2 72 implement the settings handler / disable property lock a player under the control of bsn cloud will, by default, disallow updates pushed from the cloud to the player if it is using a partner application to allow the player to accept property updates from bsn cloud, implement the settings handler which allows you to disable presentation settings docid\ a6ali6u szxhuansk6t3 partners can do this using the example script on this page to enable the settings handler include the code snippet from the example script section in your custom presentation or custom application/plugin in brightauthor\ connected, navigate to the player’s network (under the network docid\ uba8sfkmsajsibrbv4a6n tab on the top right) in this section, the player settings are available in the properties panel once the device side api is turned on, the player settings will be accessible in the properties panel of brightauthor\ connected (under the network docid\ uba8sfkmsajsibrbv4a6n tab) api specification this api specification is used by custom presentations 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 80) is http //localhost this is an internal endpoint and will only respond to a node or javascript application running on the player (it is not part of the local dws) post /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” , “message” } example script partners who want to upgrade to use this feature must include the following code snippet in their brightsign presentation or plugin note that this example is a simple autorun which can be run as is however the enablesettingshandler() subroutine should either be copied and called in an appropriate location relative to the other logic in the script, or the code within enablesettingshandler() can be copied and pasted into a valid location in script to be run within the existing logic this assumes the developer has basic knowledge of brightscript sub main() enablesettingshandler() end sub sub enablesettingshandler() 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") msgport = createobject("romessageport") supervisorcapabilitiesurlxfer setport(msgport) initiatoridentity = supervisorcapabilitiesurlxfer getidentity() 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) ok = supervisorcapabilitiesurlxfer asyncpostfromstring(stringifiedjson) if not ok then print "=== failed to send post request" else print "=== settings handler request sent" end if while true msg = wait(0, msgport) if (type(msg) = "rourlevent") receivedidentity = msg getsourceidentity() if (initiatoridentity = receivedidentity) then print "=== " + supervisorcapabilitiesurlxfer$ + ", response code " + stri(msg getresponsecode()) end if end if end while end sub 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 or it is added as a plugin to the custom presentation