---
title: Delay Commands
slug: legacy-docs/delay-commands
docTags: 
createdAt: 2025-03-11T06:58:09.586Z
---

:::hint{type="warning"}
This page / section pertains to **BrightAuthor Classic**, our legacy app. **BrightSign Author&#x20;**&#x69;s our latest app for managing content and players.

Development of BrightAuthor Classic has largely ceased and the app will eventually be deprecated and replaced with BrightSign Author.
:::

In BrightAuthor Classic, you can delay a command until certain conditions are met. For example, you can delay a command until a video has finished plyaing. This can be done either through a **Background** zone, or using a **User Variable** and **Conditional Targets**.

# Background Zone Method

Button presses (or other interactive events) can send a command to a Background zone, and the background zone will only relay the command to play the next file if it receives an OK from the currently playing file indicating that it is done. So, it just requires using zone commands in addition to the normal events you're using. Click [here](https://www.brightsignnetwork.com/download/projects-customers/19682/switch%20videos%20after%20the%20end.zip) to download an example project.

# User Variable & Conditional Targets Method

To build a presentation that transitions between videos using UDP commands, and ensures that the current video will finish before switching to the next video, follow the steps below. An example presentation file and video tutorial can be downloaded here:

::File{src="https://api.archbee.com/api/presign/TYAqEnq_Txckpox4eAKHe-Z4IhnxBWe7r1VlpUeIq6K-20250414-211159.bpf" label="transition after media end.bpf"}

::::WorkflowBlock
:::WorkflowBlockItem
Create a new presentation with an interactive playlist. Add media files to the playlist.

- In the image example below, we start playback from a home image, and wait to start video playback until the UDP command "start" is sent to the player.
- Our normal loop will be video1 > video3 > video5: The unit will loop those videos by default until we send a UDP command to switch playback to video2 or video4.

![1.jpg](https://api.archbee.com/api/optimize/511c8QBH-VHiwWnyzIwUb/Jbeo_lJjpLsm5Ybnx1GjC_name1.jpg)
:::

:::WorkflowBlockItem
Go to **File > Presentation Properties > Variables**.

1. Add a variable to the presentation.
2. Specify the name and default value of the variable.
   1. The variable value can be changed during a presentation by using the **Set Variable** or **Reset Variable** commands. The variable will be our reference point.
   2. We will use Conditional Targets to decide which state the playback should switch to based on the value of the user variable.

![2.jpg](https://api.archbee.com/api/optimize/511c8QBH-VHiwWnyzIwUb/hoR3TSgkIua08_C2POZ4Z_name2.jpg)
:::

:::WorkflowBlockItem
To create the conditional transitions:

1. Select **events** (under **Media Library**)
2. Drag the **Media End** event onto the video1 file in the playlist.
3. In the video1 state, go to **Advanced > Set Conditional Targets > Add Conditional Target**. The default value of our "var" variable is 0:
   1. If "var" = 0, we want to transition from video1 to video3 (i.e. the standard playlist behavior).
   2. If "var" = 1, we want to transition from video1 to video2 (i.e. the first interrupt).
4. Drag a Media End event onto video3 and go to **Advanced > Set Conditional Targets > Add Conditional Target**. Assign the following conditions:
   1. If "var" = 0, then transit from video3 to video5 (i.e. the standard playlist behavior).
   2. If "var" = 1, then transit from video3 to video4 (i.e. the second interrupt).

![3.jpg](https://api.archbee.com/api/optimize/511c8QBH-VHiwWnyzIwUb/b29PVzuLWBSSzmvVED5Kq_name3.jpg)
:::

:::WorkflowBlockItem
To ensure that the interrupt videos return to the standard playlist after video2 has ended, use a **Media End** event to draw a connection from video2 to video3:

1. Double click the **Media End** icon
2. Go to **Advanced > Add Command**
3. Select the **Other --Set** **Variable** command.
4. Select the variable ("var"), set the value to 0, and click **OK**. This will ensure that the variable value is reset once we return to the standard loop.
5. Repeat this step to draw a connection from video4 to video5.

![4.jpg](https://api.archbee.com/api/optimize/511c8QBH-VHiwWnyzIwUb/1HUD_RPDV43mZwDyIS7Z8_name4.jpg)
:::

:::WorkflowBlockItem
Select the **Media End** event from a tool bar and draw a connection from video5 back to video1. This will close the loop on the standard playlist and now the video zone is built. It should look like this:

![5.jpg](https://api.archbee.com/api/optimize/511c8QBH-VHiwWnyzIwUb/zOq-WGrn4Z6YUpG4rfLnU_name5.jpg)
:::

:::WorkflowBlockItem
Go to **Edit > Layout** and **Add Zone**. Select an **Audio Only** zone, or any zone that won't interfere with the visual aspects of a presentation. This zone will listen for UDP messages and use them to modify our "var" variable, thus triggering the playlist interrupts.
:::

:::WorkflowBlockItem
Add Event Handlers to handle the interactive events:

1. Go to **Edit > Playlist** and select the newly added Audio Only zone. Set the playlist type to interactive mode.
2. Under **Media Library**, select **other** and drag the **Event Handler** icon onto the playlist two times so that you have two Event Handler states. Name one "var=0" and the other "var=1"
3. Select the **UDP Input Event** from the tool bar and use it to draw a connection from the "var=0" state to the "var=1" state. Specify the UDP input as "go".
4. Double click the second Event Handler ("var=1"), go to **Advanced > Add Command** and select the **Other -- Set Variable** command. Select the variable ("var"), set the value to 1, and click **OK**.
5. Select another **UDP Input Event** from the tool bar and use it to draw a connection from the "var=1" state back to the "var=0" state. Specify a UDP input as "go".

![6.jpg](https://api.archbee.com/api/optimize/511c8QBH-VHiwWnyzIwUb/yBGR9aT9w5CTK5an-tAUA_name6.jpg)
:::
::::

# Notes

- You can build a project using whatever interactive events your player supports, not just a **UDP Input Event**.
- You can add more than one variable to a presentation and use them, along with the Conditional Targets feature, to create more complex playlists.

