Preview
This plugin has no picture of its own.
About
A background audio player for sound effects, music cues, transition sounds, and ambient audio. Triggered via rules or button clicks using the pluginAction system.
Features:
- Play sound effects from media:// URLs (embedded in MP4) or external URLs
- Multiple concurrent sounds with configurable limit
- Per-sound volume control
- Loop mode for ambient/background audio
- Auto-pause when video pauses, auto-resume on play
- Named sound IDs for targeted stop/volume control
Actions:
play— Play a sound (src, volume, loop, id)stop— Stop a specific sound or all soundsstopAll— Stop everythingsetVolume— Change volume of specific or all sounds
Usage in rules: ``json { "type": "pluginAction", "pluginId": "mp4e:sound-player", "actionId": "play", "config": { "src": "media://crowd_cheer", "volume": 0.6, "id": "cheer" } } ``
Combine with Replay Controller: ``json [ { "type": "pluginAction", "pluginId": "mp4e:sound-player", "actionId": "play", "config": { "src": "media://replay_whoosh" } }, { "type": "pluginAction", "pluginId": "mp4e:replay-controller", "actionId": "startReplay", "config": { "fromTime": 15.5, "toTime": 18.2, "playbackRate": 0.25 } } ] ``
Variables Provided:
isPlaying(boolean) — whether any sound is currently playingactiveSounds(number) — count of active sound instances
Events Emitted:
soundStarted— when a sound begins playingsoundEnded— when a sound finishes naturally (not when stopped)
Great for:
- Sports: crowd cheers, bat cracks, whistles, replay transition sounds
- Education: correct/incorrect answer feedback, notification chimes
- Entertainment: background music, ambient soundscapes, UI feedback
- E-commerce: add-to-cart sounds, checkout confirmation
Settings
What a creator can set in the Studio, and what a host can set in its overrides.
| Setting | Type | Default | What it does |
|---|---|---|---|
Default VolumedefaultVolume | Number, 0 to 1 | 0.8 | Default volume for sounds (0 = silent, 1 = full volume). Can be overridden per-action. |
Max Concurrent SoundsmaxConcurrent | Number, 1 to 20 | 5 | Maximum number of sounds playing simultaneously. Oldest sound is stopped when limit is reached. |
Events and actions
Events you can react to
| Event | When it is sent | Data |
|---|---|---|
Sound Endedplugin:mp4e:sound-player:soundEnded | Fired when a sound finishes playing naturally (not when stopped) |
|
Sound Startedplugin:mp4e:sound-player:soundStarted | Fired when a sound starts playing |
|
Actions a rule or the host can call
| Action | What it does | Its settings |
|---|---|---|
Play Soundplay | Play a sound effect. Supports media:// URLs and external URLs. |
|
Stop Soundstop | Stop a specific sound by ID, or stop all sounds if no ID provided. |
|
Stop All SoundsstopAll | Stop all currently playing sounds | - |
Set VolumesetVolume | Change volume of a specific sound or all sounds. |
|
Variables it provides
| Variable | What it holds | Type and default |
|---|---|---|
Is Playing{{mp4e:sound-player:isPlaying}} | Whether any sound is currently playing | booleanStarts as OffRead only |
Active Sounds{{mp4e:sound-player:activeSounds}} | Number of currently playing sounds | numberStarts as 0Read only |
What it can reach
This plugin asks for nothing: no network, no reading of the video's analysis, no say over what plays.
Versions
- v1.0.2November 28, 2026Current
What changed
Variables say readOnly instead of the older editable flag.
- v1.0.1August 15, 2026
What changed
Fix: sync pause/resume of sound effects from periodic mp4e:playbackState event, not only mp4e:video:play/pause transitions (iframes created mid-playback, e.g. autoplay/soft reload, had stale state until next manual pause/play).
- v1.0.0February 27, 2026
What changed
Archived version