> For the complete documentation index, see [llms.txt](https://catchdocs.gitbook.io/catch-customer-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://catchdocs.gitbook.io/catch-customer-documentation/catch-control/media-player-integrations/broadsign.md).

# Broadsign

Catch Control Interfaces with a number of existing APIs provided by Broadsign:

## Broadsign Control Player API

In order to build an internal timeline withing `Catch Control` of content currenly being played within Broadsign, `Catch Control` communicates with the [Broadsign Control Player API](https://docs.broadsign.com/broadsign-control/latest/broadsign-control-player-api.html). `Catch Control` interfaces with a number of methods defined within this API.

### `Loop Query Action`

The Loop Query actions allow third-party applications, such as `Catch Control` to query the Player API about a player's current [playlist](https://docs.broadsign.com/broadsign-control/latest/playlist-generation.html).&#x20;

#### `now_playing` and `show_loop` actions

The API is documented [here](https://docs.broadsign.com/broadsign-control/latest/loop-query-action.html), which gives details about the `now_playing` and `show_loop` actions used by `Catch Control` to retrieve all the required information required to build an internal timeline within Catch's infrastructure.

{% hint style="info" %}
Catch Control uses the `XML` interface of the Loop Query Action API, as the `JSON` implementation was found to be inaccurate in testing.
{% endhint %}

### `triggers` Action

The Triggers action allows 3rd party applications, such as `Catch Control` to send a signal to Broadsign Control Player API to activate a specific piece of [content](https://docs.broadsign.com/broadsign-control/latest/ad-copies.html) for playback on the screen. The Action is detailed in the [Broadsign Documentation](https://docs.broadsign.com/broadsign-control/latest/triggers-action.html?tocpath=For%20Developers%7CThe%20Player%20API%20and%20Dynamic%20Content%7CBroadsign%20Control%20Player%20API%7C_____14).

`Catch Control` sends triggers of various types:

* A Default trigger id, set as part of the Catch Control Configuration, which is fired every time a Catch is made (where the BLE connection was successful). The Catch Event is notified to the player from the Catch Media Gateway, which is relayed to Broadsign via the triggers Action.
* A `Catchable`-Specific Trigger, whereby the `Catchable` is Catch's internal representation of the foreign Broadsign content id. This trigger will be fired whenever a Catch is made against that `catchable_id`

## Realitime Audience API

`Catch Control` exposes a local HTTP endpoint, which hosts an API for reuesting audience measurement or prediction data.

Broadsign can interface with this API by setting the configuration profile of the same PC to be conifigured as per the screenshot below:

<figure><img src="https://3191043691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdTGfthZOwExKcXtWjteP%2Fuploads%2F0zO5HP3v3pmpIixWlfby%2Fintegrations-section-audience-tab-realtime-v14.png?alt=media&amp;token=7144492b-4f5a-4186-9ce1-257472edf4ea" alt=""><figcaption></figcaption></figure>

Select "Add", and specify the URL:

```
<host>:12000/api/audience/broadsign/{{action_name}}?frame={{frame_id}}&content={{content_id}}&start_time={{expected_play_time}}&duration={{expected_duration}}
```

By default, the `<host>` should be `localhost` but may differ where Catch Control and Broadsign Control player are not on the same machine.

Once configured, Broadsign will send local requests to `Catch Control` of the following nature:

* `START` - This informs Catch Control that a new ad play has started, which Broadsign wishes to receive audience measurement data for once complete. Catch control is already aware that an ad play has started, and so disregards this message
* `STOP` - This request is a trigger to Catch Control to reply to broadsign with an **integer** **human** impression count for this as play. This data is derived from Flow, and is transformed to an estimated human count in accordance with the Human model defioned at that player.
* `PRE` - This request iss issued by Broadsign to predict the audience levels for an upcoming ad play. This request can be issued up to 40 seconds before the ad play. `Catch Control` will respond with the most recent non-zero human model value.&#x20;

Full details of the request/response methods and protocol are available in Broadsign's documentation:

{% embed url="<https://docs.broadsign.com/broadsign-control/latest/broadsign-control-real-time-aud-api.html>" %}
