You could either load the file via an http request or you could import it at build time (I guess you're using Webpack?).
You would then need to write your own logic what should happen when the song finished. But you could use the onEndedcallback to change the audio file.
Hi Aderman
Sure. Behind it you have a native HTML Audio Element. So it works with every format that is supported by your browser.
Good!
And how i can pass a json list with mp3 and implement previous and next actions? And change automaticaly the next song when one finish?
You could either load the file via an http request or you could import it at build time (I guess you're using Webpack?).
You would then need to write your own logic what should happen when the song finished. But you could use the
onEnded
callback to change the audio file.Ok. Thank you, man!