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

Function muteAll

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

* Mutes all sounds regardless of current mute state. Maintains volume * settings on sounds. * * @return IDs of sounds that were muted

({ state, dispatch, commit })

Source from the content-addressed store, hash-verified

516 * @return IDs of sounds that were muted
517 */
518 async muteAll ({ state, dispatch, commit }) {
519 const mutes = Object.keys(state.tracks)
520 .map(track => dispatch('muteTrack', track))
521
522 commit('setMute', { track: 'all', muted: true })
523
524 const ids = await Promise.all(mutes)
525 return ids.flat()
526 },
527
528 /**
529 * Unmutes all sounds regardless of current mute state. Maintains volume

Callers

nothing calls this directly

Calls 1

dispatchFunction · 0.85

Tested by

no test coverage detected