HTML Development
Displaying HTML without BrightAuthor
5min
there are two methods to display html without brightauthor you can play an html page from the local storage without an autorun script by placing the index html file (along with other files and folders containing the page content) into the root folder of the player storage you can use brightscript to display local or remote html content the sections below pertain to using the rohtmlwidget docid\ xljq5 yhdma2ssmpzimtk brightscript object to display html to learn more about brightscript, see the brightscript docid\ r7xc0 ze4u0br662li2sj section simple webpage script the simple script outlined below displays a webpage stored on a remote server save this script as an autorun brs file, place it on an sd card, and publish it to the player if you want to display a webpage located on local storage, replace the "http //www brightsign biz" url on line 4 with the filename of the html file "file ///mytestpage html" notice that the script has a sleep(10000) line this line delays loading of the web url–this is necessary to compensate for connection delays that may occur on your network if you don’t use this script, the brightsign player may not connect in time to load the page, resulting in a “cannot resolve host” error, which indicates that the player does not have an internet connection in certain network configurations, especially when the player utilizes dhcp, you may need to increase the sleep amount (in milliseconds) to give the player more time to establish a connection before loading the page parameters for the rohtmlwidget are defined in an associative array, which is then passed during object creation see rohtmlwidget docid\ xljq5 yhdma2ssmpzimtk for more information on creating and configuring an html widget sub main() msgport = createobject("romessageport") r = createobject("rorectangle", 0, 0, 1920, 1080) config = { url "http //www brightsign biz", } h = createobject("rohtmlwidget", r, config) h setport(msgport) sleep(10000) h show() 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 portrait orientation to rotate the contents of an html page, include the transform parameter when creating the rohtmlwidget object for clockwise portrait orientation, use transform "rot90" ; for counter clockwise portrait orientation, use transform "rot270" if you're using the above simple webpage script, you can add this parameter to the config associative array on line 7 displaying scrollbars the scrollbar behavior will be the same as it is in the current version of chromium scrollbars can be enabled by including the scrollbar enabled\ true parameter when creating the rohtmlwidget object if you're using the above simple webpage script, you can add scrollbar enabled\ true to the config associative array on line 7 you can also enable scrollbars using css (for example, by referencing the simple css file below) https //archbee doc uploads s3 amazonaws com/0prk6so2dy9ldu77jb8d1/1nqv70r0er5gtsl2iuejc forcescrollbars css mobile scrollbars browser scrollbars default to desktop style (i e more prominent and visible at all times) you can configure the chromium instance for mobile style scrollbars (i e less prominent and only visible when scrolling) by writing the overlay scrollbar entry to the html section of the registry htmlregistry = createobject("roregistrysection", "html") htmlregistry write("overlay scrollbar", "1")