AMX IS-SPX-1000/1300 Universal Remote User Manual


 
Remote Control
41
Inspired XPress - Programming Guide
GET Embedded In an HTML Page
The playback GET method can also be embedded in an HTML page. The example below will let you play and pause the
media from a remote web page.
<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('playback','PLAY')">Play</button>
<button onclick="set('playback','PAUSE')">Pause</button>
</form>
</body>
</html>
Interactive Pause/Resume From a Device
Alternatively, you can control the playback of your document using the template menu_buttons.svg. The document can
be used both on the player of the media file or on remote devices.
To use the menu_buttons.svg file to control the playback, you need to configure the name of the shared variable to
'playback' or 'playback@hostname' (FIG. 52). You then need to configure the action related to the button to trigger the
PLAY and PAUSE commands.
Timed pause/seek/resume
To change the time position of the media, you can change the playback variable at any time and set it to “PLAY” with a
time position. For instance, to seek at 6.5 seconds from the start of the media, send the following command:
UPDATE "playback" "PLAY 6.5"
To pause playback at a precise position, say at 7 seconds, you would send the following command:
UPDATE "playback" "PAUSE 7"
This is equivalent to a seek to position plus pause operation.
If you wish to resume playback, just send a PLAY command with the same position as the last PAUSE.
It is also possible to use a relative position depending on the content duration to control the pause and play time. In this
case, the position should be specified in percentages. For instance, to start play at 10% from the start of the media, send
the following command:
UPDATE "playback" "PLAY 10%"
You will need to make sure that the web page is stored on a 'trusted' web site.
Otherwise, the security settings of many Web browsers might prevent you from using
the XML HttpRequest().
FIG. 52 Configuring the shared variable name