| Line 1: |
Line 1: |
| − | <span style="color: #0E9549; font-size: 24px;">'''About this constraint '''</span> | + | <pre class="header-style">This constraint allows or prevents a macro/feature from running based on whether music or audio is currently playing.</pre> |
| | | | |
| − | This constraint can be used to allow/prevent functionality from running depending on if the device is currently playing music. Note that this constraint will also apply to any media content (such as videos, podcasts etc.), so it may also be thought of as a "media playing" constraint
| + | ''' Options ''' |
| | + | |
| | + | * '''Music Active''': Constraint passes only when audio is playing |
| | + | * '''Not Playing''': Constraint passes only when no audio is playing |
| | + | |
| | + | ''' Example ''' |
| | + | |
| | + | ''Example 1: Pause playback when headphones are removed'' |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Headphones Insert/Removed - Disconnected</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Control Media (Pause)</pre> |
| | + | <pre class="constraint-style">Constraints |
| | + | |
| | + | Music Active - Playing</pre> |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Trigger: Music/Sound playing|Music/Sound playing Trigger]] |
| | + | * [[Action: Control Media|Control Media Action]] |