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

Function pauseSound

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

* Pauses a playing sound. Noop when sound is not playing. * * @param id {string} ID of the sound to pause. * * @return The ID of the paused sound * * @throws {Error} when invalid ID specified

({ getters }, id)

Source from the content-addressed store, hash-verified

324 * @throws {Error} when invalid ID specified
325 */
326 pauseSound ({ getters }, id) {
327 const sound = getters.getSoundById(id)
328 if (!sound) {
329 throw new Error(`Sound ID does not exist: ${id}`)
330 }
331
332 sound.pause()
333
334 return id
335 },
336
337 /**
338 * Stops a playing sound. Unloads and cleans up data after

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected