How do I use a Web View in a sign?
How do I use a Web View in a sign?
The Web View layer in Creator allows you to include a web page (or a web site or application) as part of a sign. As of SignStix 2.9.7, a Web View may be either:
In the interactive case, the sign is intended to be used on a touchscreen. Users can interact directly with the web site (or application) contained in the Web View. They can scroll, follow links, enter search text etc. in a very similar way to using a web browser on a computer or tablet. Under this model, SignStix becomes a powerful tool for managing and deploying web applications across your estate.
In the non-interactive case, the Web View is effectively a snapshot image of a particular web page. When deployed to a SignStix Player, the snapshot is updated once every second, making it an effective way of including ‘live’ information in your signage. Because the Web View is treated as a (special kind of) image, it can be animated in the same way as other layers such as blocks and text.
Adding a Non-Interactive Web View in Creator
- In Creator, click the ‘Web View Tool’ icon (a globe) in the toolbox at the top left.
- Drag the resulting Web View onto the sign canvas.
- Enter the URL that you would like the Web View to display then click ‘OK’.
- Ensure the ‘Interactive’ box is disabled.
Adding an Interactive Web View in Creator
- Follow the steps above but ensure the ‘Interactive’ box is enabled.
- Choose a URL Ruleset (see explanation below) so that users are restricted only to the pages you want them to see.
Note that to avoid confusion, only one interactive Web View is allowed per sign.
If you would like the entire content of the page to be determined by the JS Extension, you can set the URL to be: about:blank
In some situations, you may want a WebView to act purely as a controller (e.g. downloading data and updating layers in the sign) and not as a visual component. In such cases, the WebView can be positioned off-screen in Creator.
URL Rules for Interactive Web Views
Before adding an interactive Web View to a sign, you should deal with any security considerations first. Although there is no address bar in the Web View (so users cannot enter URLs directly), there are still some steps you should take to prevent a malicious user from displaying unwanted content on your touchscreens.
As an example, a Web View might be configured to show your own website, but if your website links to a promotional video on YouTube, say, you might inadvertently be allowing users to search for inappropriate content on YouTube.
To prevent such problems, SignStix includes the concept of a ‘URL Ruleset’. This is a set of rules governing the pages (URLs) that can or can’t be visited within an interactive Web View.
There are two kinds of rules in a URL Ruleset:
- Whitelist rule
- Blacklist rule
A whitelist rule allows a URL if it contains a particular piece of text.
For example, to allow users to browse around the SignStix website, we might add a whitelist rule for “signstix.com”. To make this more rigorous, we could insist that URLs begin with “http://www.signstix.com”. This would exclude URLs for other sites that merely have “signstix.com” as part of the query string e.g. “http://dodgy.illegal.com?victim=signstix.com”.
A blacklist rule disallows a URL if it contains a particular piece of text.
For example, we might decide that we don’t want users to conduct any purchases on the web site because they would have to enter credit card details in a public environment. So a blacklist rule for “pay” could be added.
When the user clicks a link, the corresponding URL must match at least one of the whitelist rules and none of the blacklist rules in the Web View’s ruleset. For example, given the small set of rules above, these URLs would be allowed:
But these URLs would not:
- http://dodgy.illegal.com – fails the whitelist rule
- http://www.signstix.com/payment - fails the blacklist rule
- http://dodgy.illegal.com/paymeloads - fails both the whitelist rule and the blacklist rule
Adding a URL Ruleset in Director
- Log into your SignStix account by visiting the following URL in a web browser: https://cms.signstix.com
- Enter your login details.
- Once logged in, click on ‘Modules’ in the menu at the top left then click ‘URL Ruleset’.
- Click the ‘Add’ button (a target icon with a green plus sign) and enter a name for your ruleset.
- Click the ‘Add New Rule’ button to add a new URL rule.
- Decide whether it will be a whitelist or a blacklist rule (please see the explanation above).
- In the case of a whitelist rule, select ‘Begins with’ if the text you’re about to specify must appear at the beginning of the URL. If it’s sufficient for the text to appear anywhere in a URL, deselect this box.
Note that if you select ‘Begins with’, the text you enter must begin with the full URL protocol e.g.: http://www.mycompany.com
- In the ‘URL’ box, enter the text that URLs must contain (in the whitelist case) or must not contain (in the blacklist case).
- Click ‘Add Rule’.
- Add as many rules as you require.
- Edit an existing rule by clicking on it.
- Delete an existing rule by clicking the red ‘minus’ sign.