commander.swf
FPP external plugin for keeping track of pano movement like panning, tilting and zooming. The plugin can
then trigger actions with FPP commands or functions depending on how the viewer moves in the pano. This
can also be combined with event timers to induce delayed actions. Also lack of user activity can be trapped
to trigger actions.
Plugin parameters can be read from the FPP xml file or from an external xml file.
The following parameters are supported:
xmlfile | xmlfile=commands.xml | read parameters from XML file |
action | action=... | adds an action, see below for action format |
activated | activated=0 | starts or stops action checking |
(0 or 1, anything else will toggle activation) | ||
interval | interval=100 | check interval (ms), default=200 |
remove | remove=102 | remove a single or all action(s) (action-id or "all") |
reset | reset=all | reset a single or all action(s) (action-id or "all") |
enable | enable=102 | enable a single or all action(s) (action-id or "all") |
disable | disable=102 | disable a single or all action(s) (action-id or "all") |
trace | trace=1 | prints debug info |
NOTES:
Parameter names are not case sensitive ("XMLFile" is equal to xmlfile").
The following parameters can be updated dynamically from FPP:
action
interval
remove
reset
enable
disable
activated
interval
remove
reset
enable
disable
activated
"action" parameter format:
-------------------------- In FPP xml file:
action=id|enabled|panoname|delay:flag|pan:range|tilt:range|zoom:range|inactivity|repetition|commandIn|commandOut
In external xml file:
<?xml version = '1.0'?> <commander activate="1" interval="250" trace="0"> <actions> <action id="101" enabled="1" repetition="1" panoname="../stadshuset/img/stadshuset1" pan="133:15" tilt="0:30" zoom="" delay="10:2" commandIn="global.showQmark()" commandOut="global.hideQmark()#activate=102" /> <action id="109" inactivity="15" commandIn="global.panToExit()" /> ... <action id="107" repetition="1" panoname="../stadshuset/img/stadshuset1" pan="133:15" tilt="0:30" enabled="0" commandIn="global.showEmark()" commandOut="global.hideEmark()#activate=103" /> ... </actions> </commander>
The following subparameters/attributes are supported for an action:
id | must be a number (used as internal reference and to remove, reset, enable and disable an action |
enabled | 0=action disabled, 1=action enabled (default=1) |
repetition | number of times an action may be triggered (0-nnn, default=999) |
panoname | limit action to this pano (same as hotspot "linked" parameter) |
pan | limit action to this pan range, format "pan:range", example: pan="130:20" will |
trigger action in the pan range 110 - 150. | |
tilt | limit action to this tilt range, format "tilt:range", example: tilt="-10:20" will |
trigger action in the tilt range -30 - +10. | |
zoom | limit action to this zoom range, format "zoom:range", example: zoom="1.5:0.5" will |
trigger action in the zoom range 1.0 - 2.0. | |
inactivity | action will be triggered when no change in pan, tilt or zoom has been made in the |
specified number of seconds. Normally not used together with other requirements. | |
delay | value (in seconds) for delayed action, format "delay:flag". Can be used alone simply to delay an action, |
or together with other attributes (pan, tilt, zoom). | |
flag, can be 0, 1 or 2 (default=0) | |
0: launch action with delay AFTER all other requirements are met | |
1: launch action after delay OR if other requirements are met (whichever happens first) | |
2: don't start checking other requirements UNTIL delay has passed | |
commandIn | command(s) to execute when an action is triggered |
commandOut | command(s) that will execute when action gets "untriggered", for |
example when the user leaves the triggering pan range. |
NOTE:
The command fields may consist of FPP commands and/or plugin dynamic parameters. Remember that
all FPP commands must come first and that parameter settings must start with a "#" (see examples
in plugin XML file).
As you can't use the &;= characters inside parameters in the FPP XML file, you have to encode them as follows:
& as %26
; as %3B
= as %3D
; as %3B
= as %3D
Version history:
1.21:
Fixed problem with panoName when a new pano is loaded. 1.20:
Implemented a more accurate timer function. 1.11:
Fixed bug when getting name of pano and "disableLoading=1" was used. 1.10:
Added "inactivity" parameter to trigger action when no change in pan, tilt or zoom has been made for a specified number of seconds.
Fixed problem with panoName when a new pano is loaded. 1.20:
Implemented a more accurate timer function. 1.11:
Fixed bug when getting name of pano and "disableLoading=1" was used. 1.10:
Added "inactivity" parameter to trigger action when no change in pan, tilt or zoom has been made for a specified number of seconds.