OnTheAir Video
The OnTheAir Video action controls Softron OnTheAir Video through its REST API.
Use it to:
- Start, stop, pause, and navigate playback
- Control individual playlists and clips
- Run OnTheAir Video Actions
- Control Dynamic Graphics Overlay projects
- Update CG text, images, movies, and audio
- Start, stop, or resynchronize the scheduler
- Send custom REST API requests
The action runs in the background and is available on iPhone, iPad, and Mac.
Warning: Playback commands are sent immediately. A phrase can start, stop, or alter the currently playing output without additional confirmation.
Requirements
You will need:
- Action Phrase Core or higher
- A Mac running Softron OnTheAir Video
- Network access between your Action Phrase device and the OnTheAir Video Mac
- The OnTheAir Video REST API running and accessible
- A REST API user with sufficient permissions, unless authorization has been bypassed in OnTheAir Video
Some commands require additional OnTheAir Video features:
- CG commands require the Dynamic Graphics Overlay option.
- Scheduler and Join in Progress commands may require the appropriate traffic or scheduling options.
- Run OnTheAir Action requires an Action already configured in OnTheAir Video.
Available endpoints can vary between OnTheAir Video versions. The API documentation served by your copy of OnTheAir Video is the authoritative reference.
Enable and verify the REST API
On the Mac running OnTheAir Video:
- Launch OnTheAir Video.
- Open a browser.
- Navigate to:
http://localhost:8081/api.html
If the page loads, the REST API is running. This page contains the API documentation for your installed version of OnTheAir Video.
For a remote device, replace localhost with the Mac's IP address or hostname:
http://192.168.1.50:8081/api.html
Softron uses the following default ports:
| OnTheAir Video instance | Default port |
|---|---|
| Single instance or OnTheAir Video 1 | 8081 |
| OnTheAir Video 2 | 8082 |
| OnTheAir Video 3 | 8083 |
| Additional instances | Continues sequentially |
See Softron's REST API guide for more information.
Add the action
- Create or edit a phrase in Action Phrase.
- Add an action.
- Select OnTheAir Video.
- Enter the connection information for the OnTheAir Video Mac.
- Configure authentication.
- Leave Use Raw Request disabled.
- Select a command.
- Enter the parameters required by that command.
- Save the phrase.
Connection settings
| Setting | Description |
|---|---|
| Host | The IP address or hostname of the Mac running OnTheAir Video. For example, 192.168.1.50 or ontheair.local. |
| Port | The REST API port. The default is 8081. |
| Use HTTPS | Connect using HTTPS instead of HTTP. HTTPS must first be configured in OnTheAir Video. |
Enter a bare hostname or IP address when using the separate Port and Use HTTPS settings.
If Action Phrase and OnTheAir Video are running on the same Mac, you can use:
127.0.0.1
Do not use localhost or 127.0.0.1 from an iPhone, iPad, or a different Mac. On those devices, those addresses refer to the device itself.
Authentication
The action supports three authentication configurations.
Username and password
Enter the REST API user's Username and Password, and leave Access Token empty.
Before every command, Action Phrase sends an authorization request to:
PUT /authorize
OnTheAir Video returns a fresh token, which is added to the command as a token query parameter.
This is generally the most reliable option when tokens can expire or be replaced.
Access token
Enter an existing token in Access Token.
Action Phrase uses the token directly and does not send an authorization request before the command.
If an access token and username/password are all provided, the access token takes precedence.
No authentication
Leave the username, password, and access token empty only if authorization has been bypassed in OnTheAir Video.
Authorization settings and user permissions are managed in OnTheAir Video under its HTTP Server settings. Menu names may differ between versions.
Security: OnTheAir Video tokens are included in the request URL. Use HTTPS whenever requests travel over an untrusted network, and avoid exposing request URLs in logs.
HTTPS
OnTheAir Video supports HTTPS when a valid certificate is configured.
The certificate must be named:
tls_certificate.p12
For a standard OnTheAir Video installation, Softron documents the following location:
/Library/Application Support/Softron/OnTheAir Video/OnTheAir Video/Certificates/tls_certificate.p12
The certificate must be trusted by the device running Action Phrase. A self-signed certificate that is not trusted by the device can cause the connection to fail.
See Softron's HTTPS setup guide for complete instructions.
Test the connection
The OnTheAir Video action does not currently have a separate Test Connection button.
To verify the connection:
- From the device running Action Phrase, open:
http://HOST:PORT/api.html
- Confirm that the OnTheAir Video API page loads.
- Configure a non-playout command such as Validate Playlist or Refresh Media Browser.
- Trigger the phrase and confirm the result in OnTheAir Video.
Warning: Do not use Play, Stop, Skip, Delete, or scheduler commands for connection testing while the system is on air.
The action is designed to send control commands. It does not display the HTTP response or save response data into a variable.
Selecting playlists, clips, and CG items
Commands can target OnTheAir Video objects using the identifiers accepted by the endpoint.
| Field | Accepted value |
|---|---|
| Playlist Index or ID | A playlist index or unique ID |
| Clip Index, Name, or ID | A clip index, display name, or unique ID |
| CG Project Index or ID | A CG project index or unique ID |
| CG Item Index or ID | An item index or unique ID within the project |
Recent OnTheAir Video versions may also accept playlist names. Consult the api.html page served by your installed version.
Names containing spaces and other special characters are automatically URL-encoded.
Playback commands
These commands control the main OnTheAir Video playback state.
| Command | Parameters | Description |
|---|---|---|
| Play | Optional playback position | Starts playback. |
| Stop | None | Stops playback. |
| Pause or Resume | None | Toggles between paused and playing. |
| Resume | None | Explicitly resumes paused playback. |
| Skip Next | None | Skips to the next item. |
| Skip Next Live Only | None | Skips only when the current item is a live item. |
| Skip Previous | None | Returns to the previous item. |
| Clear Next | None | Clears the item currently marked to play next. |
| Cue Trigger | None | Fires the configured cue trigger. |
| GPI Trigger | Input, default 1 |
Fires the specified GPI input trigger. |
| Join in Progress | None | Joins playback at the position calculated by the current schedule. |
Playback position
The following commands can optionally start at a particular position:
- Play
- Playlist Play
- Clip Play
Three position formats are available:
| Field | Example | Description |
|---|---|---|
| Relative Timecode | 00:00:12:00 |
Timecode relative to the beginning of the playable item. |
| Media Timecode | 10:00:12:00 |
A timecode in the source media's timecode range. |
| Relative Seconds | 12.5 |
A position expressed in seconds. |
Normally, only one position field should be provided. Leave all three empty to start at the normal playback position.
Playlist commands
All targeted playlist commands require Playlist Index or ID.
| Command | Additional parameters | Description |
|---|---|---|
| Playlist Play | Optional playback position | Starts the selected playlist. |
| Playlist Stop | None | Stops the selected playlist. |
| Playlist Pause or Resume | None | Toggles the selected playlist between paused and playing. |
| Playlist Resume | None | Resumes the selected playlist. |
| Playlist Skip Next | None | Skips to the next clip in the selected playlist. |
| Playlist Skip Previous | None | Returns to the previous clip. |
| Playlist Clear Next | None | Clears the clip marked to play next. |
| Playlist Join in Progress | None | Joins the selected playlist in progress. |
| Validate Playlist | None | Requests validation of the playlist and its clips. |
| Delete Playlist Clips | None | Deletes every clip from the selected playlist. |
| Close Playlist | None | Closes the selected playlist. |
| Create Empty Playlist | Playlist Name | Creates a new empty playlist. |
Warning: Delete Playlist Clips removes every clip from the selected playlist. Verify the playlist identifier before using this command.
Clip commands
Clip commands require:
- Playlist Index or ID
- Clip Index, Name, or ID
| Command | Additional parameters | Description |
|---|---|---|
| Clip Play | Optional playback position | Plays the selected clip. |
| Clip Stop | None | Stops the selected clip. |
| Clip Pause | None | Pauses the selected clip. |
| Clip Resume | None | Resumes the selected clip. |
| Clip Skip Next | None | Sends the skip-next command for the selected clip. |
| Clip Skip Previous | None | Sends the skip-previous command for the selected clip. |
| Set Clip as Next | None | Marks the selected clip as the next clip to play. |
| Clear Clip Next | None | Removes the selected clip from the play-next position. |
| Clip Join in Progress | None | Joins the selected clip in progress. |
| Validate Clip | None | Validates the selected clip. |
| Force Validate Clip | None | Forces OnTheAir Video to validate the clip again. |
| Delete Clip | None | Deletes the selected clip from its playlist. |
Warning: Delete Clip permanently removes the selected clip from the playlist.
Run an OnTheAir Video Action
Select Run OnTheAir Action to run an Action already configured in OnTheAir Video.
| Field | Required | Description |
|---|---|---|
| Action Name | Yes | The exact name of the OnTheAir Video Action. |
| Parameter | No | An optional value passed to the Action. |
The Action must already exist on the target OnTheAir Video system, and the API user must have permission to run it.
Dynamic Graphics Overlay commands
Dynamic Graphics Overlay commands require the corresponding OnTheAir Video option.
Project commands
| Command | Parameters | Description |
|---|---|---|
| Open CG Project | Project Path, optional Layer Index | Opens a CG project at an optional layer index. |
| Play All CG Projects | None | Plays every open CG project. |
| Pause All CG Projects | None | Pauses every open CG project. |
| Stop All CG Projects | None | Stops every open CG project. |
| Play CG Project | CG Project Index or ID | Plays the selected project. |
| Pause CG Project | CG Project Index or ID | Pauses the selected project. |
| Stop CG Project | CG Project Index or ID | Stops the selected project. |
| Close CG Project | CG Project Index or ID | Closes the selected project. |
| Scrub CG Project | CG Project Index or ID, Position | Moves a timed project to the supplied numerical position. |
The supported range and meaning of Position depend on the OnTheAir Video version. Check the local api.html documentation.
CG item commands
These commands require:
- CG Project Index or ID
- CG Item Index or ID
| Command | Value | Description |
|---|---|---|
| Set CG Item Hidden | Hidden | Shows or hides the selected item. The default is hidden. |
| Set CG Item Text | Text | Changes the item's plain-text content. |
| Set CG Item HTML Text | HTML Text | Changes the item's HTML-formatted text. |
| Set CG Item Movie Path | Movie Path | Changes the movie used by the item. |
| Set CG Item Image Path | Image Path | Changes the image used by the item. |
| Set CG Item Audio Path | Audio File Path | Changes the audio file used by the item. |
File paths are interpreted by the Mac running OnTheAir Video. They must point to files or mounted volumes that are accessible from that Mac.
For example:
/Volumes/Graphics/Sponsor Logo.png
A file that exists only on the iPhone, iPad, or remote Action Phrase Mac cannot be loaded by OnTheAir Video.
Scheduler commands
| Command | Parameters | Description |
|---|---|---|
| Start Scheduler | None | Starts the OnTheAir Video scheduler. |
| Stop Scheduler | None | Stops the scheduler. |
| Resynchronize Scheduler | None | Requests that the scheduler resynchronize its current state. |
| Open Scheduled Playlist | Playlist Path | Opens the playlist at the supplied path through the scheduler. |
The playlist path must be accessible from the OnTheAir Video Mac.
Warning: Starting, stopping, or resynchronizing the scheduler can affect automated playout immediately.
Media commands
| Command | Description |
|---|---|
| Refresh Media Browser | Requests that OnTheAir Video refresh its Media Browser. |
Variables
Text and number parameters support Action Phrase variables using double braces:
{{variableName}}
For example, a CG text command could use:
Now Playing: {{programName}}
A clip identifier could use:
{{nextClip}}
Variables are resolved when the phrase runs.
Variables can also be used in raw paths and raw JSON bodies. The command and HTTP method selectors themselves cannot be replaced with template variables.
Raw REST requests
Enable Use Raw Request to call an endpoint that is not included in the built-in command list.
The following methods are supported:
GETPOSTPUTPATCHDELETE
Configure:
| Setting | Description |
|---|---|
| Method | The HTTP method to send. |
| Raw Path | A relative API path or complete HTTP/HTTPS URL. |
| Raw JSON Body | An optional JSON request body. |
Relative path example
/playback/current_item
The path is combined with the configured host, port, and protocol.
Dynamic Graphics Overlay example
Method:
PUT
Raw Path:
/playback/cg_projects/{{projectId}}/items/{{itemId}}
Raw JSON Body:
{
"text": "{{lowerThirdText}}"
}
For POST, PUT, and PATCH requests, Action Phrase automatically sets:
Content-Type: application/json
Request bodies are not sent with GET or DELETE requests.
If authentication is configured, the token is automatically appended to the request URL. If the raw path already includes a token query parameter, Action Phrase preserves that token instead of adding a second one.
Security: A complete URL in Raw Path overrides the configured host. Because the access token may be appended to that URL, use complete URLs only for trusted OnTheAir Video servers.
Raw requests can call read endpoints, but the response body is not exposed as an Action Phrase variable.
Troubleshooting
The API documentation page does not load
Confirm that:
- OnTheAir Video is running.
- The host and port are correct.
- The HTTP server is enabled.
- The Mac's firewall permits incoming connections.
- Both devices are on networks that can communicate.
- You are not using
localhostfrom a different device.
The phrase runs, but nothing happens
Check that:
- A command has been selected.
- Every required parameter has a value.
- The playlist, clip, project, or item identifier is correct.
- The API user has permission to execute the command.
- The installed OnTheAir Video version supports the endpoint.
- Authentication succeeded.
If a required field is empty, Action Phrase does not send the request.
The request is unauthorized
Verify the username, password, and user permissions in OnTheAir Video.
If using a pasted access token, obtain a fresh token and try again. A newer authorization may have replaced or invalidated the previous token.
If OnTheAir Video is configured to bypass authorization, leave all authentication fields empty.
An endpoint returns “Not Found”
API endpoints can change between OnTheAir Video versions. Open:
http://HOST:PORT/api.html
Compare the raw path with the documentation served by the installed application.
Softron recommends checking API compatibility when different OnTheAir Video versions are involved. See the OnTheAir Video release notes.
HTTPS does not connect
Confirm that:
- HTTPS is enabled in OnTheAir Video.
- The certificate is valid and has not expired.
- The certificate hostname matches the configured host.
- The certificate is trusted by the Action Phrase device.
- The HTTPS port is correct.
CG commands do not change the output
Confirm that:
- The Dynamic Graphics Overlay option is enabled.
- The CG project is open.
- The project and item identifiers are correct.
- The target item supports the value being changed.
- Referenced media files are accessible from the OnTheAir Video Mac.
A raw JSON body is ignored
Request bodies are only sent with POST, PUT, and PATCH. They are omitted from GET and DELETE requests.
Also confirm that the JSON is valid and that its property names match the API documentation for the installed OnTheAir Video version.