Allow multiple sources as an array
Thygoddess opened this issue · comments
This project is very cool, but I have noticed that you force the sources to be an array directly in src/index.ts
Example
src: [url],
This actually disables one of Howler's features to allow multiple sources. It would be neat if you could allow us to pass an array or a string, as intended!
Do you mean that multiple audio files be used??
Fair point – I'd accept a PR that checks first to see if url
is an array, and only wraps it if it isn't! Something like:
src: Array.isArray(url) ? url : [url]
@joshwcomeau please check #52