loading...

re: How to create a progressive audio player with React hooks VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Hi, great article! Can run this project with mp3 files?
 

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 onEndedcallback to change the audio file.

Ok. Thank you, man!

Code of Conduct Report abuse