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

Function fadeAndStopAll

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

* Fades all sounds and stops those sounds after fading. Takes the same * options as fadeAll and stopAll * * @return Array of sound IDs that were faded and stopped

({ dispatch, state }, opts)

Source from the content-addressed store, hash-verified

634 * @return Array of sound IDs that were faded and stopped
635 */
636 async fadeAndStopAll ({ dispatch, state }, opts) {
637 const fades = Object.keys(state.tracks)
638 .map(track => dispatch('fadeAndStopTrack', { ...opts, track }))
639
640 const ids = await Promise.all(fades)
641 return ids.flat()
642 },
643
644 /**
645 * Fades all sounds on a track and stops those sounds after fades are complete

Callers

nothing calls this directly

Calls 1

dispatchFunction · 0.85

Tested by

no test coverage detected