Using an HTML Zip Package
This page describes how to use an HTML zip package for playback in the Player.
Uploading and using a zipped HTML package works in a similar way than having an HTML file with multiple files that are synchronized using the Forward and Store mechanism. The advantage over the regular HTML solution is that all files are downloaded together, so the files are available on the Player faster and more reliably. You can also take advantage of the Forward and Store feature to have certain files automatically updated.
As with the HTML File method, you must create an HTML file with additional libraries and content and place everything together. The main HTML file that the Player will use must be called index.html. Follow the same guidelines as for writing regular HTML content for the Splash Player.
Once the HTML and additional content is ready to be published and played on the Player, zip the files together, making sure that the file index.html is in the base folder of the zip file. The other files can be all on the same level or in sub-folders, as long as the HTML code can reach them.
With the HTML package zipped, upload the zip file the same way as with any other type of designs. Schedule the bundle containing the zip file as usual. You can use the Forward and Store feature; however, remember that those files will be in their own sub-folder in the Player’s local folder. When looking on a Player, the file layout will look like this:
/opt/ayuda/splashplayer/lib/local/
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.zip
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/
/opt/ayuda/splashplayer/lib/local/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/
img1.png
img2.jpg
index.html
script1.js
script2.js
style1.css
text1.txt
video1.mp4
Once the zip file is uploaded to Splash and scheduled, the Player will then download the zip file. The Player keeps the zip file on the disk and extracts the content in a sub-folder with the name of the design id (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
When the Player queues this file, it looks inside the folder for a file named index.html and opens it with the Player’s internal browser. It performs the same steps as for any regular HTML file: queue the file and check if the HTML is ready to play, if the browser must wait instead or if the Player must skip this design and queue the next one.
A copy of the original zip is kept on top of the extracted files to ensure the integrity of the files and to be able to quickly redeploy the files if they are altered while the Player is stopped. Keep this aspect in mind when provisioning hard disk space for your Player.