* 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)
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected