Tea’s audio macros wrap the built-inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/pompom454/tea/llms.txt
Use this file to discover all available pages before exploring further.
SimpleAudio subsystem. They let you register tracks, control playback with fade support, organize tracks into groups or playlists, and manage master volume—all from within passage text.
<<cacheaudio trackId sourceList>>
Registers an audio track for use by all other audio macros. Supply one or more source URLs so the browser can pick a format it supports. Best done in the StoryInit special passage.
A unique identifier string used to reference the track in other audio macros.
One or more space-separated audio sources: relative URLs, absolute URLs, audio passage names, or data URIs. Prepend a format specifier (
mp3|, ogg|, wav|, etc.) when the format cannot be inferred from the URL.<<audio trackIdList actionList>>
Controls playback of one or more tracks. Accepts individual track IDs, predefined group IDs, or custom group IDs as the target list.
- Basic playback
- Fading
- Volume & mute
- Group IDs
- Load / unload
| Action | Description |
|---|---|
play | Start playback |
pause | Pause playback |
stop | Stop playback |
loop | Enable looping |
unloop | Disable looping (default) |
mute | Mute volume |
unmute | Unmute volume (default) |
volume level | Set volume (0–1) |
time seconds | Seek to position |
fadein | Fade to volume 1 over 5 seconds |
fadeout | Fade to volume 0 over 5 seconds |
fadeto level | Fade to level over 5 seconds |
fadeoverto seconds level | Fade to level over N seconds |
goto passage | Navigate when track ends normally |
load | Force reload of buffered data |
unload | Drop all buffered data |
<<audio>> cannot affect tracks whose ownership has been transferred to a playlist (those registered with the own action in <<createplaylist>>). Owned tracks are under exclusive control of their playlist.<<createaudiogroup groupId>> … <</createaudiogroup>>
Collects previously cached tracks into a named group using <<track>> child macros. Groups let you target several tracks simultaneously via <<audio>> without listing each one individually. Group IDs must start with a colon.
The unique group ID. Must start with a colon (e.g.
:ui, :music). Cannot reuse predefined IDs (:all, :looped, :muted, :paused, :playing, :stopped) or :not.<<createplaylist listId>> … <</createplaylist>>
Creates a playlist from cached tracks via <<track>> children. Each track may optionally set a volume and/or be registered as an owned copy (exclusively controlled by the playlist).
The unique ID for the playlist.
<<track>> actions within <<createplaylist>>:
| Action | Description |
|---|---|
volume level | Optional. Base volume for this track in the playlist (0–1). |
own | Optional. Creates an independent copy solely controlled by this playlist. |
<<masteraudio actionList>>
Controls the master audio bus—affects all tracks simultaneously.
| Action | Description |
|---|---|
stop | Stop all tracks |
mute | Mute master volume |
unmute | Unmute master volume (default) |
volume level | Set master volume (0–1) |
muteonhide | Auto-mute when browser tab loses visibility |
nomuteonhide | Disable auto-mute on hide (default) |
load | Force all tracks to reload |
unload | Drop all track data |
<<playlist listId actionList>>
Controls playback of a named playlist created via <<createplaylist>>. Supports the same fade actions as <<audio>> plus playlist-specific actions like shuffle and skip.
<<removeaudiogroup groupId>>
Removes a custom audio group. The predefined groups (:all, :looped, :muted, :paused, :playing, :stopped) and :not cannot be removed.
<<removeplaylist listId>>
Removes a playlist that was created with <<createplaylist>>.
<<waitforaudio>>
Displays the loading screen until all currently registered audio has either loaded to a playable state or aborted due to errors. Invoke it once after registering the tracks you want to preload.
<<waitforaudio>> should be called once, after <<cacheaudio>> and any <<createplaylist>> definitions that use the copy action, for the loading screen to reflect those tracks. Calling it multiple times is unnecessary.