* Fades all sounds on a track and stops those sounds after fades are complete * * @param opts {object} * @param opts.fadeOpts {@see fadeTrack} * @param opts.unload {boolean} cleanup sounds after stop * * @return Array of sound IDs that were faded and stopped
({ dispatch }, { unload, ...fadeOpts })
| 651 | * @return Array of sound IDs that were faded and stopped |
| 652 | */ |
| 653 | async fadeAndStopTrack ({ dispatch }, { unload, ...fadeOpts }) { |
| 654 | const ids = await dispatch('fadeTrack', fadeOpts) |
| 655 | |
| 656 | const stops = ids.map(id => dispatch('stopSound', { id, unload })) |
| 657 | await Promise.all(stops) |
| 658 | |
| 659 | return ids |
| 660 | }, |
| 661 | |
| 662 | /** |
| 663 | * Fades a sound and stops it after fades are complete |
nothing calls this directly
no test coverage detected