Copyright © 2025-2026 Candy ArtsMedia Players
Media players play the media Dialogues control: audio, video, images (with the Media commands) and animation effects (with the Effect commands). Controlling media from a Dialogue is covered in Media.
| Player | Plays |
| Audio Players | Music, sounds, ambience, recorded speech... |
| Video Players | Videos. |
| Image Players | Images and frame-folder animations. |
| Effect Players | Animations from AnimationLibraries, to animate any part of your UI. |
"Music"), and the name of its media folder (see Media Files).
Keys can be renamed or removed, and any number of players added.
The Player Node
A media player is a single node of the right type, with the matching script attached. Each script has one required variable, the node it plays through (audio_player, video_player, image_player or effect_player). It defaults to the node the script is attached to, so it rarely needs changing.
Access
Several Engines can share a media player, such as a music player shared by every Dialogue in your game. The Access settings decide which Engines may control it. Background Scenes and VN Scenes use the same settings.
Private and Public
- Private (default): the player only obeys the Engine that owns it (see "Owning or naming" in UI Elements). A Private player that no Engine owns obeys none.
- Public: any Engine may control it, as its Public Mode allows.
| Public Mode | Other Engines |
| Exclusive | Their commands are rejected. |
| Semi-Exclusive | They may only send the commands in semi_exclusive_commands (by default: pause, resume, stop, volume, skip). |
| Free | They may send any command. One that takes hold becomes the holder. |
"Media_Play"); case doesn't matter. Add your own commands to these lists if they act on media players.
| Setting | Purpose |
| hold_commands | Commands whose sender becomes the player's holder. A Line can override this with its Take_Hold key. |
| semi_exclusive_commands | Commands other Engines may still send while the player is held in Semi-Exclusive mode. |
| unrestricted_commands | Commands accepted from any Engine, Private or Public, held or not. They only affect the Engine's own Dialogue (e.g. waiting for the player to finish), never the player itself. |
- suspend_held_media / end_held_media in Candy_Properties.gd.
- The same settings on the Engine, when enable_suspend_held_media / enable_end_held_media is on.
- The same settings on the player (under Held Player Overrides), when its enable_ switch is on.
| Hook | Called |
| x_playback_starting() | Right before the player starts playback. |
| x_playback_started() | Right after playback has started. |
| x_playback_finished() | Once the playback is over. |
[[command values], [player values]]: the Line's Custom Data, then that of the Line's entry for this player. See UI Elements for how hook functions work.
When playback is over
x_playback_finished() is called once for each playback the first two hooks announced, when the player stops playing it. Use it to react to the end of a media, such as hiding the frame around a video or restoring your game's music after a jingle.
- The media reached its end by itself: all its loops are done, or its Duration ran out.
- The media was stopped, by a Media_Stop or Effect_Stop command (at once, or where its Loops and Duration said) or by the end of the Dialogue.
- It isn't called when another Media_Play or Effect_Play starts a new playback on a player that is still playing. The player continues to play, and the hook is called when that new playback is over.
- It isn't called for a Pause or for a Dialogue suspension. The playback isn't over.
- The Engine doesn't wait for it: an
awaitinside it delays nothing.