* Mutes all sounds regardless of current mute state. Maintains volume * settings on sounds. * * @return IDs of sounds that were muted
({ state, dispatch, commit })
| 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 |
nothing calls this directly
no test coverage detected