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

Function muteSound

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

* Mutes a sound regardless of current mute state. Maintains volume * settings on sound. * * @param id {string} song ID to mute * * @return sound ID that was muted * * @throws {Error} when invalid sound ID specified

({ getters }, id)

Source from the content-addressed store, hash-verified

598 * @throws {Error} when invalid sound ID specified
599 */
600 muteSound ({ getters }, id) {
601 const sound = getters.getSoundById(id)
602 if (!sound) {
603 throw new Error(`Sound ID does not exist: ${id}`)
604 }
605
606 sound.mute(true)
607 return id
608 },
609
610 /**
611 * Unmutes a sound regardless of current mute state. Maintains volume

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected