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

Function pauseAll

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

* Pauses all tracks. Noop when already paused. * * @return Array of IDs of the paused sounds

({ state, dispatch })

Source from the content-addressed store, hash-verified

124 * @return Array of IDs of the paused sounds
125 */
126 async pauseAll ({ state, dispatch }) {
127 const pauses = Object.keys(state.tracks)
128 .map(track => dispatch('pauseTrack', track))
129
130 const ids = await Promise.all(pauses)
131 return ids.flat()
132 },
133
134 /**
135 * Stops all tracks and clears current play data. Removes all

Callers

nothing calls this directly

Calls 1

dispatchFunction · 0.85

Tested by

no test coverage detected