Webserver - Restructured
Introduction
The webserver
service allows for content to be interacted with as input and output on a webpage in Javascript-enabled browsers.
Docker name: webserver
Input
required sensors: none
required actuators: none
required services: none
Any Javascript-supported content (e.g.: text, media files, bytestream, HTML, etc.) can be used as input.
Output
The webpage created can display any type of output supported by regular Javascript-enabled pages. Thus the content from other services, or coming from any other source can be displayed on the page as long as it is Javascript-supported.
Parameters
None
Initialisation
Using the service
connect any browser to the SIC framework by navigating to https://<serverIP>:11880
the browser is automatically registered as a device, and its identifier is shown upon load
the identifier is different each time the page reloads
create content to be displayed
custom images (i.e. that don’t have a public URL) can be embedded using Base64 encoding
the Bootstrap framework (v4.6) is used to render a styled HTML
<body>
of an application through websocket-based communicationany
<button>
element automatically sends its contents to the application<div>
elements can have built-in effects:chatbox
: shows a text-type input, from which the input is sent to the Dialogflow service upon submission.english_flag
: shows an English flag, which when clicked upon will send a command to set the language to 'en-US'.listening_icon
: shows a listening icon (in the form of a microphone), which shows a user when the microphone is open.speech_text
: shows a live transcript of the text currently recognised by the Dialogflow service.vu_logo
: shows a VU logo.
adding the class
class=audioEnabled
in the content allows the browser device to also function as a full-fledged microphone and speaker device
interact with the displayed content (e.g.: end-user input, application-driven rendering) on the secure websocket https://<serverIP>:11881
Example
An example of displaying content as a SIC webpage can be found here.
Known Issues
warnings about a self-signed SSL certificate being used should be ignored/circumvented.
on Java-capable devices, the computer-browser program can do this automatically.
on Pepper robots, the tablet is automatically connected as well, although a pop-up will need to be dismissed on the tablet upon first connection.
browser permissions for microphone and speakers
most of the time requires user interaction (e.g.: pressing a browser button)
not all browsers support this (e.g.: iOS Safari is not supported)
Â
Â