MCPcopy Create free account
hub / github.com/codecombat/codecombat / fadeAndStopSound

Function fadeAndStopSound

app/core/store/modules/audio.js:671–676  ·  view source on GitHub ↗

* Fades a sound and stops it after fades are complete * * @param opts {object} * @param opts.fadeOpts {@see fadeTrack} * @param opts.unload {boolean} cleanup sound after stop * * @return Sound ID that was faded and stopped

({ dispatch }, { unload, ...fadeOpts })

Source from the content-addressed store, hash-verified

669 * @return Sound ID that was faded and stopped
670 */
671 async fadeAndStopSound ({ dispatch }, { unload, ...fadeOpts }) {
672 await dispatch('fadeSound', fadeOpts)
673 await dispatch('stopSound', { id: fadeOpts.id, unload })
674
675 return fadeOpts.id
676 }
677 }
678}

Callers

nothing calls this directly

Calls 1

dispatchFunction · 0.85

Tested by

no test coverage detected