Player APIs (BrightScript & Ja...
JavaScript APIs

system

8min
the system object provides functions related to the system software system idl interface system { void reboot(); void factoryreset(); void rebootwithcrashreport(); promise\<void> setimagesizethreshold(size size); }; interface size { attribute int width; attribute int height; }; object creation to create a system object, first load the brightsign/system module using the require() method then create an instance of the system class var systemclass = require("@brightsign/system"); var system = new systemclass(); system use this interface to call system software methods reboot() void reboot() instructs the player to perform a soft reboot factoryreset() void factoryreset() instructs the player to perform a factory reset rebootwithcrashreport() void rebootwithcrashreport() instructs the player to perform a reboot with a crash report suspend() void suspend() puts the player into low power mode, if it is supported on the platform the player will turn off peripherals and most of the core functionality to save power it can be woken up with rst, svc button, or other platform dependent wake up sources(rtc, wake on lan etc ) available as of bos 9 0 168 setimagesizethreshold() promise\<void> setimagesizethreshold(size size) changes the maximum allowed resolution for images this method accepts a size interface specifying the new allowed resolution the default image resolution limit is 2048x1280x32bpp (or 4096x2160x32bpp for xtx44, xtx43, xdx34, xdx33, 4kx42 players) displaying images larger than the default value may deplete the graphics memory and cause a crash, so we recommend testing a script that uses this method thoroughly before deploying it in a production environment without altering the default maximum resolution, you can increase the maximum width of images by sacrificing height (e g using a 4096x640x32bpp image on non 4k capable players is allowed) you can also increase the maximum width/height by reducing the bpp value (e g using a 4096x1280x16bpp on non 4k capable players is allowed) size this interface describes the dimensions of an image width int int the width of the image height int int the height of the image example var systemclass = require("@brightsign/system"); var system = new systemclass(); imagesize = {}; imagesize width = 4224; imagesize height = 2376; system setimagesizethreshold(imagesize) then( console log("image threshold configured ")) catch( function(data) { console log(json stringify(data)); });