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

Function playAll

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

* Plays all tracks. Noop when already playing.

({ state, dispatch })

Source from the content-addressed store, hash-verified

111 * Plays all tracks. Noop when already playing.
112 */
113 async playAll ({ state, dispatch }) {
114 const plays = Object.keys(state.tracks)
115 .map(track => dispatch('playTrack', track))
116
117 const ids = await Promise.all(plays)
118 return ids.flat()
119 },
120
121 /**
122 * Pauses all tracks. Noop when already paused.

Callers

nothing calls this directly

Calls 1

dispatchFunction · 0.85

Tested by

no test coverage detected