* Fades all tracks between two volumes. * * @param opts {object} * @param opts.from {number|undefined} start volume between 0 and 1 * @param opts.to {number} finish volume between 0 and 1 * @param opts.duration {number} duration of fade in milliseconds * * @return
({ state, dispatch }, { from, to, duration })
| 389 | * @return Array of sound IDs that were faded |
| 390 | */ |
| 391 | async fadeAll ({ state, dispatch }, { from, to, duration }) { |
| 392 | const fades = Object.keys(state.tracks) |
| 393 | .map(track => dispatch('fadeTrack', { track, from, to, duration })) |
| 394 | |
| 395 | const ids = await Promise.all(fades) |
| 396 | return ids.flat() |
| 397 | }, |
| 398 | |
| 399 | /** |
| 400 | * Fades a track between two volumes. |
nothing calls this directly
no test coverage detected