Playing audio files simultaneously conveniently


#1

Hey,
does anyone have any idea how can i load and play mp3 files in a convenient way?
i’ve tried both ns-audio & ns-sound.
ns-audio is slow and i dont seem to be able to play from a local server, and ns-sound doesnt seem to work at all, no errors, just nothing is played…
I want to be able to play different music files simultaneously and easily with “foo.play()” calls
prefferably from the assets folder.,
I achieved this easily on the web using the howler.js library(the files are on a local server though)…but i dont seem to find anything similar to it for ns :disappointed:


#2

Did you mean all the audio files will be hosted in remote location?


#3

Yes, either that or simply(if possible) to have them locally and play them from a asset folder.
i tried both ways and neither worked…


#4

Do you mean it never played? Did you check the demo apps?


#5

the ns-audio plays after a 3 second delay, the ns-sound doesnt work at all.
for ns-sound there is no demo, and in ns-audio the demo is in a really old format, but works.
but i cant really understand whats going on there…
i just need a simple sample of a audio file being played on a button click, instantly. :sob:


#6

Obviously if you play audio form remote location it’s going to take time to buffer based on the network connectivity. If you still have delay in local audio, please share the repo where I can reproduce it, so I can take a look.


#7

yea, but locally im not able to play it at all…
here’s the repo - https://github.com/Seanitzel/ns-vue-audio-sample
btw thanks for the help!