Sample HTML File
This page presents some samples that you can experiment with when learning how to configure HTML5 Content.
There are two examples, each in HTML and zipped X-HTML versions.
Sample HTML File – Attributes
This example showcases how an HTML file can read specific attributes and other details of a player.
The sample comes in two versions:
To set up the file, upload the design in Splash and set the resolution and duration of the file. The file is made to be resizable, so the typical 1920x1080 and 1080x1920 will work without problem.
Once this is done, book a spot matching the duration of the design on the face (see Adding a Booking Line) which is currently linked to your test player (see Adding a Face to a Player) and schedule the design (see Digital Scheduling).
Optionally, you can add attributes to the face, its frame, location or site (see Adding Attributes). The sample file will read every attributes in the file and display them in a table.
Once the player runs, the content will look like the following:
The HTML being directly in the local folder, the location.xml and the attributes.xml files are accessed directly and the data is displayed on the screen.
Additional libraries are referenced directly from the Internet, on the assumption that the player is able to connect to them.
The X-HTML version will look like the following:
Since zip files are extracted in a subfolder, the code has to take into account that the location.xml and attributes.xml files are in the parent folder, from the perspective of index.html. In loading those files, a ../
is added to the path of those files.
To make the zip more robust, all the additional libraries are bundled inside the zip, the file should be running on an offline player. This is an advantage of zipping static files instead of using an inline HTML file.
This Zipped X-HTML file is also compatible with the Broadsign Control Player. The content will look like the following:
Upload the design as usual in Broadsign Control Administrator as described in Content and Scheduling Tutorial in the Broadsign Control Administrator documentation.
Sample HTML File – Forward and Store
This example showcases how an HTML file can read files that are stored on a FTP site.
The sample comes in two versions:
You will also need to get the sample content to put on your FTP server. The files are in a zipped folder here. To set up the folder, unzip the additional content on your chosen FTP server, and note down the server name, credentials and the location where the files are placed.
The compressed Forward and Store package will look like the following when it is extracted:
To set up the file, upload the design in Splash and set the resolution and duration of the file. The file is made to be resizable, so the typical 1920x1080 and 1080x1920 will work without problem.
Once this is done, book a spot matching the duration of the design on the face (see Adding a Booking Line) which is currently linked to your test player (see Adding a Face to a Player) and schedule the design (see Digital Scheduling).
Once the player runs, the content will look like the following:
The HTML file expects the additional files to be in the folder that is set in the design’s Player Target Folder Name, which is called “forward_and_store” for this sample. If these do not match, as per best practice, the HTML’s header will show “skip” with an error message. This will alert the Splash Player to completely skip the HTML playback and move on to the next spot.
The video in this sample HTML is loaded from forward_and_store/pexels-ekaterina-bolovtsova-6650207.mp4.
The X-HTML version will look like the following:
With zip files, the additional content contained in the zip alongside index.html is extracted in a subfolder. Those files can be referenced being in the same folder or a direct subfolder.
Since we cannot predict the Guid of the design once it is on a player, and to allow reuse of Forward and Store folders to optimize network usage, the additional folder synchronized from FTP cannot reside inside the folder of an extracted zip package. The folder will sit inside the local folder in the same way as with designs of other types relying on Forward and Store. The HTML then would reference the Forward and Store folder by going to the parent folder, and then to the target folder. This is achieved by adding a ../
to the target folder where the files from the FTP are located.
The video in this sample HTML is loaded from ../forward_and_store/pexels-ekaterina-bolovtsova-6650207.mp4.
See Also:
- Supported Media Formats: Images, Video and Audio
- Creating Network Sync Groups
- Troubleshooting the Splash Player