4.4-HTML Sites

Important

If you want to use the application cache for HTML5 sites (which allows the player to cache remote HTML content on the local storage), you will need to enable the Limit storage space by function option in Edit > Preferences > Storage. HTML5 sites must be configured properly for caching to work.

Use this tab to add HTML5 sites to your presentation. You must add sites in this tab before you can include HTML5 states in the playlist.

Adding an HTML Site

To add an HTML5 site, click Add HTML Site and specify the following:

  • HTML site name: Enter a name for the HTML5 site.
  • Local Content: Select this option to display HTML5 content using files located on the local storage of your computer. Click the Browse button to locate the .html file that you wish to display.
  • URL: Select this option if you wish to play an HTML5 page from a web address.
  • Query string (optional): Enter a query string to be appended to the site URL using the following format: "http://www.example.com/over/there?my_query_string". You can specify the query spring as either a static value or a User Variable. To utilize a User Variable, enter the name of the variable between two sets of dollar signs (e.g. “$$variable1$$”). BrightAuthor will not recognize the variable without these dollar signs.

Settings

  • Enable Javascript console: Check this box to enable the JavaScript console for HTML sites. To access the JavaScript console while the player is running, open a web browser on a device connected to the same local network as the player. Then, enter the IP address of the player, followed by port number 2999 (for example, “http://10.1.0.154:2999”). You will be able to inspect any page added to the HTML Sites tab, not just those currently running.

Note

You must use a WebKit-based browser (e.g. Chrome, Safari) to access the JavaScript console.

Automatically generate user variables for the selected data feeds

You can use Data Feeds to populate a set of User Variables for HTML5 pages. The User Variables can then be retrieved using JavaScript. Use the <title> tag of the Data Feed to specify the Name of a variable and the <description> tag to specify its default value.

  • Access: Select Shared to make the User Variable accessible to other presentations scheduled on the player. If two presentations use a variable with the same name, the value of the variable with the Shared attribute will be used for the variable with the Private attribute.
  • Plugin Script: You may optionally choose to have the feed parsed by a piece of customized BrightScript code. This occurs after the feed is retrieved from the network and before it is used to provide User Variable values to the HTML page. To add a plugin, use the Browse button to locate the .brs file containing the BrightScript code.
  • Parser Function Name: Enter the name of the subroutine that parses the feed.