# Overlay Action

Overlay actions allow you to use Mix It Up's overlay webpage to dynamically add visual effects to your stream. Whether you are using OBS, XSplit, or another streaming software, you can simply add the Overlay to your stream to take advantage of it.

If you do not have Overlay interaction set up, you'll see an error message stating "Please enable Mix It Up Overlay in the Services Section!". See the [Overlay Services](/docs/overlays) page for more information.

Overlay Actions can be divided into one of two groups, dynamic visual and [Overlay Widget](/docs/overlays/overlay-widgets) interactions:

## Overlay Dynamic Visuals (Text, Images, Videos)

Dynamic visuals are things that can be displayed on the Overlay for a set period of time. These are useful for commands when you want to show something temporarily such as some text, an image, or a video clip. Each of these options allows you to set a Duration amount for how long the visual will be shown for. The Duration amount supports [Special Identifiers](/docs/reference/special-identifiers) and in some cases can be left blank for certain types that will dynamically determine how long to show it for based on the media.

All dynamic visuals let you specify where it should be positioned. When picking where to show the Overlay Action, you have access to the following options:

- **Simple:** Shows the visual in one of 9 locations on the screen
- **Percentage:** Shows the visual at a specific percentage position from the top and left side of the Overlay
- **Pixels:** Shows the visual at a specific pixel position
- **Random:** Shows the visual at a random location within the range of left and top pixel positions

All dynamic visuals also have animations that can be applied to them. Each one has a base Entrance and Exit animation based on the Duration, but additional animations can be added that will trigger at specific times you set:

### Text

The Text Overlay Action allows you to show a set of text on your stream. This can be useful for showing something such as the username of a person that just followed or subscribed.

The Max Width option allows you to set a maximum width for a set of text before it will attempt to wrap the text to the next line. For example, setting the Max Width to 200 will make it so that any text longer than 200 pixels in width will continue to wrap until the end of the text:

### Image

The Image Overlay Action allows you to show an image on your stream. This can be useful for showing something like a funny image or a user's avatar.

When selecting an image via the Windows Open File dialog, multiple images can be selected. This will randomly pick one of the selected images each time the Overlay Widget is shown / refreshed.

You can optionally specify a width and/or height for the image or leave the fields blank and it will use the native size of the image when it's displayed. If only width **or** height is specified, it will use proportional calculation to scale the other based on what was specified and the actual size of the image.

### Video

The Video Overlay Action allows you to show a video on your stream. The video file path specified can either be a local or online-hosted video file.

Video Overlay Actions support **not** specifying a Duration amount and will play the entire length of the video if one is not specified.

The Loop option allows you to have the video repeatedly play back-to-back.

You can optionally specify a width and/or height for the video or leave the fields blank and it will use the native size of the video when it's displayed. If only width **or** height is specified, it will use proportional calculation to scale the other based on what was specified and the actual size of the video.

The Start Time option allows you to set at what second into the video it will start playing.

The Volume slider allows you to set the overall volume level of the video. If you wish to control the audio device that the video is played over, you must either change the default audio device selected in Windows -or- control the audio of the web browser source containing this Video Overlay Action within your streaming software.

### YouTube

The YouTube Overlay Action is useful for showing a persistent YouTube video on your stream. The YouTube video URL supports many different text formats and supports Special Identifier replacement.

YouTube Overlay Actions support **not** specifying a Duration amount and will play the entire length of the video if one is not specified.

Because YouTube videos do not have a specific resolution set for them, you *must* specify both width and height for the video.

The Start Time option allows you to set at what second into the video it will start playing.

The Volume slider allows you to set the overall volume level of the video. If you wish to control the audio device that the video is played over, you must either change the default audio device selected in Windows -or- control the audio of the web browser source containing this YouTube Overlay Action within your streaming software.

### HTML

The HTML Overlay Action allows you to show free-form HTML within the Overlay. These are particularly useful when you want to show a very basic display of something that requires a bit more customization than one of the standard types.

### Timer

The Timer Overlay Action allows you to show a timer for a specific amount of seconds based on the Duration amount specified. The timer can optionally be toggled to count up from 0 to the Duration instead of counting down to 0 from the Duration.

The display format for how the timer is shown can be customized. For information on how to use this, please see the [Timer Display Formats](/docs/overlays/persistent-timer#display-format) section.

### Twitch Clip

The Twitch Clip Overlay Action allows you to show a Twitch Clip from a variety of different sources. The majority of options allow you to specify a specific username to grab a clip for based on the type selected (EX: Latest Clip will grab the latest available clip for the user specified). The Specific Clip option allows you to specify a URL to a specific Twitch clip to play and supports many URL formats.

This option provides the following special identifiers which can be used in other actions in your command:
- $twitchclipduration = The duration of the Twitch clip that was selected

### Emote Effect

The Emote Effect Overlay Action allows for the display of emotes on your Overlay in various visual effects. This includes effects like raining emotes, emote explosions, and more. You are able to select the specific type of animation that is applied to the emotes or use the Random option to have it randomly apply an animation each time the emote effect is triggered. Note that this "Emote Effect" action is a distinct feature from the separately-documented **Persistent Emote Effect** Overlay Widget, which passively reacts to every chat message using a Combo Count and Timeframe and has no Emote Text field of its own.

All emote text specified in the Emote Text field will be used for selection. Each emote must be space separated and [Special Identifiers](/docs/reference/special-identifiers) are supported. A common usage may be to use the $allargs [Argument Special Identifier](/docs/reference/special-identifiers#arguments) or the $message Special Identifier found on [Chat Commands](/docs/chat/chat-commands).

The Duration, Width, and Height options allow you to define how long the emote(s) appear for and their display size.

The Per Emote Shown option allows you to set how many emotes are shown on screen for each emote that is in the chat message. For example, if a chat message has 3 emotes in it and the Per Emote Shown option is set to 5, then 5 emotes will be shown for each of the emotes in the chat message with a total of 15 emotes shown (3 * 5).

The Max Amount Shown option limits the total number of emotes that will be shown, regardless of how many are specified.

The Allow URLs option allows you to include image URLs in the effect as well.

The Allow Emoji option allows you to include standard emojis and emoticons in the effect as well.

## Overlay Widget Interactions

[Overlay Widget](/docs/overlays/overlay-widgets) Interactions allow you to control certain aspects of Overlay Widgets from within regular commands. The options available will be specific to each Overlay Widget and not all Overlay Widgets have interaction points via the Overlay Action.

### Enable/Disable Widget

The Enable/Disable Widget option allows you to enable/disable a specific widget, which can also be thought of as showing/hiding it. While an Overlay Widget is disabled, no functionality is running or being tracked by the Overlay Widget.

### Damage Stream Boss

The Damage Stream Boss option allows for dynamic damage/healing to be applied to the current [Stream Boss Overlay Widget](/docs/overlays/stream-boss). The amount specified will be directly added/subtracted to the boss when it is triggered. This can be useful for non-standard events, such as a Twitch Channel Point Reward that can add damage to the boss.

If a positive number is specified, this will apply damage. If a negative number is specified, this will heal the boss by that amount.

If the user that triggered the command is also the current stream boss, the amount is normally applied as healing rather than damage, but only when the Stream Boss widget's **Self Healing Multiplier** is greater than 0. If that multiplier is 0 or negative, a boss "damaging" themselves is treated as ordinary damage instead.

If the "Force Damage" option is toggled, this will always apply damage to the boss, even if the user that triggered the command is the current stream boss.

### Add To Goal

The Add To Goal option allows for amounts to be added/subtracted from a [Goal Overlay Widget](/docs/overlays/goal). The amount specified will be directly added/subtracted to the goal when it is triggered. This can be useful for non-standard events, such as a Twitch Channel Point Reward that can add an amount to the goal.

### Add To Persistent Timer

The Add To Persistent Timer option allows for amounts to be added/subtracted from a [Persistent Timer Overlay Widget](/docs/overlays/persistent-timer). The amount specified will be directly added/subtracted to the timer when it is triggered. This can be useful for non-standard events, such as a Twitch Channel Point Reward that can add an amount to the timer.

### Pause/Unpause Persistent Timer

The Pause/Unpause Persistent Timer options allow you to pause or unpause a [Persistent Timer Overlay Widget](/docs/overlays/persistent-timer). While paused, the timer will not continue to count down.

### Add To End Credits

The Add To End Credits option allows you to add dynamic items to a Custom section for an [End Credits Overlay Widget](/docs/overlays/end-credits). By selecting the "Add To End Credits" option, you will be able to select the corresponding End Credits Overlay Widget and the custom section you want to add an item to. The "Text" text box is what will replace the `{Text}` property in the Item Template, meaning whatever you type in "Text" is what will get shown.

### Play End Credits

The Play End Credits option allows you to trigger the start of the [End Credits Overlay Widget](/docs/overlays/end-credits) based on the current information it has been tracking.

### Add To Event List

The Add To Event List option allows you to add events to an [Event List Overlay Widget](/docs/overlays/event-list). The user that triggered the command will be the user shown in the top-portion of the event and the text specified in the "Details" box will be what appears in the bottom-portion of the event:

### Spin Wheel

The Spin Wheel option allows you to perform a spin of a [Wheel Overlay Widget](/docs/overlays/wheel).

### Run Widget Function

The Run Widget Function option allows you to dynamically call a Javascript function defined in an Overlay Widget. This option is usable with all Overlay Widgets, but it becomes particularly useful with [Custom Overlay Widgets](/docs/overlays/custom) simply due to the nature of them being custom.

When using the option, specify both the name of the function you want to call in the Javascript of the Overlay Widget + any parameters you want to pass in:
