Displaying HTML with MRSS Feeds

 

BrightAuthor versions 4.1.1.x and later allow you to display HTML using an Media RSS Feed state. The player can use the data from an MRSS feed to download and display HTML, or it can display HTML from a remote URL. MRSS feeds can also contain image, video, and audio files to mix with the HTML content for playback.

This page outlines how to format an MRSS feed so that BrightAuthor can successfully parse and display HTML elements contained within it.

MRSS HTML is supported with Media RSS Feed states only–other BrightAuthor components that support MRSS elements (e.g. Live Text states) do not support HTML files.

URLs and Widgets

There are two ways to specify an HTML page in an MRSS feed, depending on how the player will download and display it:

  • URL: The player displays the HTML file at the specified remote URL, similar to how a browser displays a web page. The Internet connection must be active at the time the MRSS feed item is played–if not, the playlist will skip the item.

  • HTML Widget: The player downloads a self-contained set of HTML files packaged in a .zip file. It then unpacks the .zip file, writes the contents to the local storage, and displays the HTML similar to an image or video file in an MRSS feed. The HTML files will remain on the local storage as long as the HTML media item is referenced in the MRSS feed–it can even remain when unreferenced if there is space in the Dynamic Data segment.

Both content types include a duration value, which, similar to MRSS images, specifies how long the page will be displayed before moving on to the next item in the feed. 

MRSS Specifications for HTML Content

A Media RSS (MRSS) feed is an XML document that describes a playlist of media files to download and play. The standard use case involves a playback client (in this case, the BrightSign player), which downloads the XML document from a remote source at regular intervals, determines if any media files have been added or changed, downloads new files using URLs provided in the document, and then plays the media files in an automated playlist. If a media file disappears from the XML document the next time it is downloaded, it is removed from the playlist.

The full specification for the MRSS document format can be found here.

The XML document includes a <media:content> element for each media item. This element includes information such as the media type, file size, and download URL for the file. If the media item is HTML, the element must also contain the following fields:

  • medium"document"

  • type: Specify one of the following:

    • "text/html": Instructs the player to display the specified URL as a web page.

    • "application/widget": Instructs the player to attempt to download the file at the specified URL, unpack it, and display it.

  • url: The URL of the webpage or .zip file for the player to access.

  • duration: An integer number indicating how long (in seconds) the HTML file should be displayed. 

Zip File Requirements

If you want to use the "application/widget" option described above, note the following requirements when archiving the webpage files:

  • The starting page must be named "index.html", and it must reside in the root directory of the .zip file.

  • The .zip file can contain as many files and subdirectories as needed to contain assets, CSS, scripts, etc.

  • If the .zip file contains subdirectories, the directory structure must match the internal hyperlinks.

  • Internal hyperlinks should be relative links within the directory structure.

Alternate Feed Formats

You can write an MRSS parser script to handle alternate feed formats, including feeds that are similar in purpose to MRSS but are formatted differently (e.g. SMIL), as well as MRSS feeds that specify HTML content using a different method. An MRSS parser, which is written in BrightScript and added to a BrightAuthor presentation with the Data Feed, can handle custom elements in a feed and provide the internal data structures expected by the BrightAuthor presentation.