Skip to content

Commit 43d0ee2

Browse files
authored
Add missing docs for SoundSlot.EVENT_END (#7634)
1 parent c39f728 commit 43d0ee2

File tree

1 file changed

+12
-0
lines changed
  • src/framework/components/sound

1 file changed

+12
-0
lines changed

src/framework/components/sound/slot.js

+12
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@ class SoundSlot extends EventHandler {
8686
*/
8787
static EVENT_STOP = 'stop';
8888

89+
/**
90+
* Fired when a sound instance stops playing because it reached its end. The handler is passed
91+
* the {@link SoundInstance} that ended.
92+
*
93+
* @event
94+
* @example
95+
* slot.on('end', (instance) => {
96+
* console.log('Sound instance playback ended');
97+
* });
98+
*/
99+
static EVENT_END = 'end';
100+
89101
/**
90102
* Fired when the sound {@link Asset} assigned to the slot is loaded. The handler is passed the
91103
* loaded {@link Sound} resource.

0 commit comments

Comments
 (0)