Audio Player Controller
![audio player controller](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/audio_player_controller-15f137e1ce976c1ed211915a8ffc6bb0.png)
Use Audio Player Controller to control the audio source from the Audio Player component. Audio Player Controller is in the Audio category.
Input
Name | Data Type | Description |
---|---|---|
Play | Exec | Play the audio source. |
Stop | Exec | Stop the audio source. |
Pause | Exec | Pause the audio source. |
Resume | Exec | Resume the audio source. |
Audio Player | Component | The Audio Player (Component) you want to control. |
Output
Name | Data Type | Description |
---|---|---|
On Play | Exec | Execute the next node when the audio source starts playing. |
On Stop | Exec | Execute the next node when the audio source stops playing. |
On Finish | Exec | Execute the next node when the audio source finishes playing on each loop. |
Example
When the camera detects an open mouth, it will trigger the Audio Player’s audio source to play and loop 3 times. When the audio is playing, it will trigger the alien to appear. When the loop finishes, the alien will disappear.
![audio player controller node](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/audio_player_controller_node-74d4ca6da66c927d541b9fa786ede045.png)