Manages background audio for tours and demos
- Copyright:
- Synaptory Fractal Traveler, 2025-2026
- License:
- MIT
- Source:
Members
(inner, constant) DEFAULT_VOLUME
Default volume level (0-1)
- Source:
(inner, constant) FADE_DURATION
Fade duration in ms
- Source:
(inner, constant) FADE_STEP
Fade step interval in ms
- Source:
(inner) audioReady :boolean
Type:
- boolean
- Source:
(inner) fadeInterval :number|null
Type:
- number | null
- Source:
(inner) isMuted :boolean
Type:
- boolean
- Source:
(inner) tourAudio :HTMLAudioElement|null
Type:
- HTMLAudioElement | null
- Source:
Methods
(static) destroyTourAudio()
Cleans up audio resources.
- Source:
(static) initTourAudio(audioSrc)
Initializes the audio element for the Riemann tour.
Call this once at app startup.
Parameters:
| Name | Type | Description |
|---|---|---|
audioSrc |
string | Path to the audio file |
- Source:
(static) isTourMusicMuted() → {boolean}
Returns current mute state.
- Source:
Returns:
- Type
- boolean
(static) isTourMusicPlaying() → {boolean}
Returns whether tour music is currently playing.
- Source:
Returns:
- Type
- boolean
(static) setTourMusicVolume(volume)
Sets the volume for tour music.
Parameters:
| Name | Type | Description |
|---|---|---|
volume |
number | Volume level (0-1) |
- Source:
(static) startTourMusic() → {Promise.<void>}
Starts playing the tour music with a fade-in effect.
- Source:
Returns:
- Type
- Promise.<void>
(static) stopTourMusic() → {Promise.<void>}
Stops the tour music with a fade-out effect.
- Source:
Returns:
- Type
- Promise.<void>
(static) toggleMute() → {boolean}
Toggles mute state for tour music.
- Source:
Returns:
New mute state
- Type
- boolean