Remote Control
37
Inspired XPress - Programming Guide
<html>
<script>
function set( name, value ) {
var request=new XMLHttpRequest();
request.open("GET", "http://192.168.1.10:1234/update?"+
encodeURIComponent(name)+"="+encodeURIComponent(value));
request.send();
}
</script>
<body>
<form>
<button onclick="set('menu','P1')">Click</button>
</form>
</body>
</html>
Switching Content With the Serial Port
To change the current media via the serial port, you need to do the following:
Create a protocol file (.fsm format) describing the actions to be performed depending on the input on the serial
port.
Upload the protocol file to the IS-SPX Player using the Serial Port page of the HTTP configuration interface.
Enable the protocol file by selecting it in the protocols drop box.
The protocol file should trigger an <update> action on the variable when matching the input on the serial port.
For instance, the sample below will trigger an update of the menu variable when an '1' or a '2' is received on the serial
port.
<?xml version="1.0" encoding="utf-8"?>
<protocol target='monitor' startup='start'>
<state xml:id='start'>
<onInput match="1" >
<update name='menu' value='L1' />
</onInput>
<onInput match="2" >
<update name='menu' value='L2' />
</onInput>
</state>
</protocol>
Switching Content With a USB HID Device
You can change the current media with a USB keyboard, or any USB device of the HID class that emulates one,
including IR remote controls. The keystroke.svg template lets you associate keystrokes with a request to update the value
of the shared variable that controls the current media.
You should have only one keystroke.svg template in each project, preferably as the background layer of the top index.svg.
If you have multiple layers which accept keyboard events, you have to make sure the correct one gets the focus. This
template has no displayable content and is fully transparent.
Specify the mapping from key to value in the Key Identifiers tab in the keystroke.svg file (FIG.48). Key identifiers may
be augmented with “modifiers”, so as to match on the key stroke only if some other control key is down at the same time.
The valid modifiers are Ctrl, Alt, Shift, AltGr. and Meta. For instance, to match a stroke on “A” while the holding the
Control key down, the key identifier is “Ctrl+A”.