Specifications

Synchronized Content
66
AMX InspiredSignage XPress Programming Guide
Additional syntax for multiscreen content
The following two methods are also available to build multiscreen contents:
Extension of the SVG <switch> element
JavaScript MULTI_SCREEN_ID variable
Extension of the SVG <switch> element
The SVG <switch> element allows you to conditionally display SVG elements. This is a standard SVG
element described in the SVG specification. For the handing of multiscreen content, a proprietary condition
has been added. This lets you visualize a specific content based on the screenID of the player running the
project. The <g> content is shown only if spx:multiScreenId is equal to “screenID”. Multiple <g> contents, for
different “screenID” values can be listed into the same <switch> element.
<switch>
<g spx:multiScreenId="screenID">
</g>
<switch>
Value definitions:
spx:multiScreenId="screenID"
is the variable tested by the switch, it contains the ID of the current screen.
screenID is the value associated with each of the screens where the content will be displayed (e.g.
“left”, “right”, “top”, “bottom”, etc).
Extension of JavaScript
When using JavaScript in an SVG file, the variable MULTI_SCREEN_ID is always defined. It allows you to
visualize a specific content based on the screenID of the player running the project.
Value definitions:
MULTI_SCREEN_ID="screenID"
is the variable tested by the if statement, it contains the ID of the current screen.
screenID is the value associated to each of the screens where the content will be displayed (e.g.
“left”, “right”, “top”, “bottom”, etc).
Example: Screen layout with six screens
The following example creates a 2-columns, 3-rows grid with 6 16:9 screens set horizontally
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:spx="http://www.amx.com/namespace/1.0/spx"
height="100%" width="100%"
spx:begin="T000000" viewBox="0 0 2560 2160" >
<spx:multiScreen>
<spx:screen viewBox="0 0 1280 720" xml:id="TopLeft"/>
<spx:screen viewBox="1280 0 1280 720" xml:id="TopRight"/>
<spx:screen viewBox="0 720 1280 720" xml:id="MidLeft"/>
<spx:screen viewBox="1280 720 1280 720" xml:id="MidRight"/>
<spx:screen viewBox="0 1440 1280 720" xml:id="BotLeft"/>
<spx:screen viewBox="1280 1440 1280 720" xml:id="BotRight"/>
</spx:multiScreen>