BrightSign Partner Packet

Autorun Files

4min
as was covered, player provisioning consists of applying a setup to the player which includes the installation of a player app the player app must contain an autorun brs file which, as an example, may instruct the player to display a specific html file, either local on the player or on an external website alternatively, the autorun may instruct the player to check a particular url for updated presentations and/or content and, if new files are available, download them and play them there are three autorun related files autorun brs (may also be referred to as “the autorun” or “autorun file”) autorun zip autozip brs these have similar sounding names, but each term has a different function so it’s important to not conflate the terms upon bootup, the player searches for certain files the player’s search follows a prescribed sequence as shown below players will search for storage devices in a player storage docid\ o4yzospnpfagbglduleee the player first looks for an autorun brs file in the root directory of the first storage device it encounters if found, autorun brs is executed if an autorun brs file is not found, the player looks for an autorun zip file in the same root directory if an autorun zip file is found and it also contains within it an autozip brs file, the player will unzip the autorun zip file, in the process overwriting any existing files on the storage device the player will then reboot if these files are not found on the first storage device, the player will repeat these steps on the next storage device, if available if an autorun zip is not found on any of the storage devices, the player will query the bsn cloud provisioning service to see if the player has previously been provisioned with bsn cloud both autorun brs and autozip brs must be written in brightscript and be given the specific filenames indicated additional information about these files can be found robrightpackage docid 1dr98 7il7gyneownx2cr below are sample autorun brs and autozip brs files for reference sample autorun brs this autorun brs file instructs the player to display a local html file, specifically, index html sub main() 'create the brightsign event handler msgport = createobject("romessageport") 'define the screen viewing area r = createobject("rorectangle", 0, 0, 1920, 1080) 'set the url where the presentation resides this can be either local or external config = { url "file ///index html", } 'create an html event since our presentation is an html file h = createobject("rohtmlwidget", r, config) h setport(msgport) sleep(10000) h show() 'event loop to ensure that the script runs indefinitely while true msg = wait(0, msgport) print "type(msg)=";type(msg) if type(msg) = "rohtmlwidgetevent" then eventdata = msg getdata() if type(eventdata) = "roassociativearray" and type(eventdata reason) = "rostring" then print "reason = ";eventdata reason if eventdata reason = "load error" then print "message = ";eventdata message endif endif endif end while end sub sample autozip brs a sample autozip brs file can be downloaded here https //archbee doc uploads s3 amazonaws com/0prk6so2dy9ldu77jb8d1/ncbh3p srrdbk0cpx59zc autozip brs content sources docid\ r6jurccpbptlmjpkkkaj6