Play Now Action
The Play Now action allows third-party applications to communicate with a Broadsign Control Player, generating injected playlist items to play on a screen.
Program conditions in Broadsign Control Administrator and associate them to campaigns.
Call the play_now action by 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
A condition can be toggled on a player by invoking the standalone executable remote_action which ships with Broadsign Control Player. It can be found in the player’s installation bin directory.
For example, to invoke the play_now, type:
remote_action play_now --name playthisnow --max-duration Value
Where:
- play_now is the action type.
- name is for the name of the condition (see conditions). In the example above, the name of the condition is
playthisnow
. - max-duration is the maximum duration of the playback, in seconds.
- If the max-duration is longer than the total length of the conditional items, it will play in loop.
- If max-duration is omitted, shorter than the length of the items, or set to 0, the loop of conditional items will play once.
Note: The specified condition is not being activated on the player, it will only be used to generate the injected playlist items.
For non-cinema players:
The current content is interrupted and the requested content will play. Once the conditions content has finished playing, the interrupted playlist will resume from where it was interrupted.
For cinema players:
Playback will never be interrupted, always played completely according to the slot duration.
Play Now will be ignored under the following conditions:
- A movie is ongoing
- Preshow
When Play Now is activated, it will communicate with the JNIOR device to emulate a preshow start. When the playback is complete, the JNIOR will reset to the state it was before the Play Now started.
A custom application can set and remove conditions on Broadsign Control Player by sending an XML message to the monitor_remote port (2324).
<rc version="1" id="1" action="play_now" name="playthisnow" max-duration="20">/>\r\n\r\n
Note: You must terminate the request with \r\n\r\n
.
The player will respond with the following document:
<rc version="1" status="1" action="play_now" id="1" />
Note: Each command sent requires a unique identifier (id). The application can use a simple incrementing value here.
Custom Field Report 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 |
---|---|
version | The version is always 1. |
id | Contains the identifier of the request. |
action | The kind of action to be taken; always play_now. |
name | The name of the condition to set. This must match the name of the criteria in Broadsign Control Administrator. Condition matching is case insensitive; however, white space must be exact. |
max-duration |
The maximum duration of the playback, in seconds. Optional.
|
A custom application can set and remove conditions on Broadsign Control Player by sending a JSON message to port 2326. You will need to enable the WebSocket server. For more information, see The Remote Control Tab.
{
"rc": {
"version": "1",
"id": "1",
"action": "play_now",
"name": "playthisnow",
"max-duration": "20",
}
}
The player will respond with the following document:
{
"rc": {
"id": "1",
"version": "1",
"action": "play_now",
"status": "1"
}
}
Custom Field Report 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 |
---|---|
version | The version is always 1. |
id | Contains the identifier of the request. |
action | The kind of action to be taken; always play_now. |
name | The name of the condition to set. This must match the name of the criteria in Broadsign Control Administrator. Condition matching is case insensitive; however, white space must be exact. |
max-duration |
The maximum duration of the playback, in seconds. Optional.
|