Stop Command Action
Third-party applications can invoke the Stop Command action via the Player API. Stop Command forces the player to stop playing the current content and start playing the next item in the loop policy.
A third-party application monitoring some event might want to tell Broadsign Control Player to skip to the next file. Likewise, a dynamic HTML5 file might need to play in a dynamic-length slot. Then depending on some event or variable, self-terminate the slot.
You can achieve these use cases with the stop action.
Call the stop action using one of the following:
WebSocket Server:
-
JSON – You can pass parameters from within your HTML5 file using JSON.
Note: Ensure that you select Enable Remote Control in the Remote Control tab of the configuration profile. See The Remote Control Tab.
Note: If using JSON via the WebSocket server, any firewall present on Broadsign Control Player should be configured to access port 2326 directly for use.
Port 2324:
- remote_action – An application that ships with Broadsign Control Player, using command line.
- XML – If you want to develop your own applications, you can communicate directly with Broadsign Control Player API using XML.
Note: Ensure that you select Enable Remote Control in the Remote Control tab of the configuration profile. See The Remote Control Tab.
Note: Any firewall present on Broadsign Control Player should be configured to either allow bsp.exe to open ports, or configure port 2324 or port 2326 directly for use.
Note: The Triggers Action is the only exception to this rule. It uses port 2325. See Triggers Action.
You can call this action on Windows and Ubuntu Linux, and find it along the following paths:
- Windows (64-bit):
- Ubuntu Linux:
/opt/broadsign/suite/bsp/bin/
C:\Program Files\BroadSign\bsp\bin
To use the command-line remote_action tool, find the executable in Broadsign Control Player’s installation bin directory. For example, to send a stop command, type:
remote_action.exe stop -f 1234
Where:
-
stop: The action type.
-
-f: Specifies the ID of the frame to stop.
Warning: Omitting -f causes all frames to stop playing the current content and start playing the next.
A custom application can use the Stop action on Broadsign Control Player by sending an XML message to the monitor_remote port (2324):
<rc version="1" id="1" action="stop" frame_id="1234" />\r\n\r\n
Note: You must terminate the request with \r\n\r\n
.
The player will respond with the following document:
<!DOCTYPE rc>
<rc id="1" version="1" action="stop" status="1"/>
Note: Each command sent requires a unique identifier (id). The application can use a simple incrementing value here.
Stop Command Action - XML Parameters
Note: Any firewall present on Broadsign Control Player should be configured to either allow bsp.exe to open ports, or configure port 2324 or port 2326 directly for use.
Parameter | Description |
---|---|
id | Contains the identifier of the request. |
version | The version is always 1. |
action | The kind of action to be taken, in this case stop. |
status | A result of "1" indicates that the command succeeded. |
frame_id | Optional. This is the ID of the frame in which the content should be stopped. If you omit frame_id, the player stops all frames that are playing content. This will simplify the programming of single-frame fullscreen layouts. |
A custom application can use the Stop action by sending a JSON message to the WebSocket server of monitor_remote (port 2326). You will need to enable the WebSocket server. For more information, see The Remote Control Tab.
{
"rc": {
"version": "1",
"id": "1",
"action": "stop",
"frame_id": "1234"
}
}
Note: Each command sent requires a unique identifier (id). The application can use a simple incrementing value here.
The player will respond with the following document:
{
"rc": {
"id": "1",
"version": "1",
"action": "stop",
"status": "1"
}
}
Stop Command Action - JSON Parameters
Note: If using JSON via the WebSocket server, any firewall present on Broadsign Control Player should be configured to access port 2326 directly for use.
Parameter | Description |
---|---|
id | Contains the identifier of the request. |
version | The version is always 1. |
action | The kind of action to be taken, in this case stop. |
status | A result of "1" indicates that the command succeeded. |
frame_id | Optional. This is the ID of the frame in which the content should be stopped. If you omit frame_id, the player stops all frames that are playing content. This will simplify the programming of single-frame fullscreen layouts. |