Widgets
- 11 Oct 2024
- 2 Minutes to read
- Print
Widgets
- Updated on 11 Oct 2024
- 2 Minutes to read
- Print
Article summary
Did you find this summary helpful?
Thank you for your feedback
A widget is a locally cached HTML page so the media players don't require constant internet connection.
HTML pages can be hosted and scheduled as a webpage, this requires the media player to have constant internet connection.
Additional Features
- Access local files:
- The index.html file can link to files on the local media player. For example, add '<img src="C:\Pictures\example.jpg"> to the widget to display the specified image.
- Query Parameters:
- Global variables and custom settings are sent as query parameters so the widget can read any variables set in the CX portal.
- Global variables and custom settings are sent as query parameters so the widget can read any variables set in the CX portal.
Create a Widget
To upload a widget, it must be packaged into a .zip file. A widget must include a HTML page, manifest and logo image:
The HTML page, manifest and logo files must be in the root of the ZIP file. It's common that when packaging a ZIP, a folder can be created inside the ZIP file which will cause the widget not to play.
Manifest
A manifest is required so both the CX portal and media player recognising the ZIP file as a Dise widget:
{
"name": "<required>",
"media_type": "application/x-dise-widget",
"manifest_version": 1,
"start": "<required>",
"version": "<optional>",
"description": "<optional>",
"thumbnail": "<optional>"
"created": "<optional>",
"size": <optional>,
"hash": "<optional>",
"privileges": "<optional>"
}
- name:
- Name to display in the portal, in content and playlists.
- media_type:
- Must be "application / x-dise-widget" for the portal and player to register the ZIP is a Dise widget.
- Must be "application / x-dise-widget" for the portal and player to register the ZIP is a Dise widget.
- manifest_version
- Must be set to 1.
- Must be set to 1.
- start
- The filename of the HTML page.
- thumbnail
- The filename of a PNG or JPG image used as a thumbnail in the CX portal.
- The filename of a PNG or JPG image used as a thumbnail in the CX portal.
- version
- Manage the widget versioning.
- Manage the widget versioning.
- description
- A description of the widget.
- A description of the widget.
- created
- A timestamp for when the widget was created.
- A timestamp for when the widget was created.
- size
- Total size in bytes of the widget.
- Total size in bytes of the widget.
- hash
- A SHA2 hash of the widget.
- A SHA2 hash of the widget.
- privileges
- The rights the widget should have in its iframe. These are read by the media player when loading the widget.
- Follows the same format as an iframe's "sandbox" attribute: https://html.com/attributes/iframe-sandbox/.
- Default privileges are: "allow-forms allow-modals allow-pointer-lock allow-popups allow-scripts allow-same-origin".
Example:
{
"name": "MyWebsite",
"media_type": "application/x-dise-widget",
"manifest_version": 1,
"description": "HTML5-application to show internal information",
"start": "info.html",
"thumbnail": "logo.png",
"privileges": "allow-forms allow-modals allow-pointer-lock allow-popups allow-scripts allow-same-origin"
}
Upload a Widget
Ensure the widget ZIP is packaged correctly with a manifest included.
- Navigate to 'Widgets' in the left menu: 🔎︎
- Drag files into the upload banner or click the upload button: 🔎︎
- Widgets can be added to folders and shared folders.
Add a Widget to a Playlist
- Navigate to 'Playlists' in the left menu: 🔎︎
- Select the 'options' arrow in the side panel to select from the widget library:🔎︎
- Drag and drop one or more widgets from the side panel into the playlist.
Was this article helpful?