← Back to Projects

Audio player like Spotify with React.js

Goal

4Geeks Coding Projects tutorials and exercises for people learning to code or improving their coding skills

Difficulty

intermediate

Repository

Click to open

Video

Not available

Live demo

Not available

Average duration

16 hrs

Technologies

Music Player React

Let's create a MP3 player that works similar to Spotify Todo List.

The buttons should always remain at the bottom of the viewport (use position fixed for that). You only need to implement the Play, Pause, Next and previous buttons.

🌱 How to start this project

Do not clone this repository.

The first step to start coding is cloning the react.js boilerplate on your local computer or opening it using gitpod.

a) If using Gitpod (recommended) you can clone the boilerplate by clicking here.

b) If working locally type the following command from your command line:

$ git clone https://github.com/4GeeksAcademy/react-hello `

πŸ’‘ Important: Remember to create a new repository, update the remote (git remote set-url origin <your new url>), and upload the code to your new repository using add, commit and push.

πŸ“ Requirements

  • List the songs from the Sounds API using the Fetch API.
  • When the user clicks on a song, the player it must start playing it.
  • When the user clicks on the "next" button the player should start playing the next song from the list, if there is no next song then it should start over by playing the first song of the list, the same applies for the "previous" button.
  • Use the react ref attribute to get the audio tag from the DOM.
  • Make sure to have only one <audio> tag on the entire project, use ref to change its src url.

😎 Feeling Confident?

The following features are not needed for the final solution, but you can develop them if you feel confident enough:

  • +1 Implement implement volume control: two buttons, one to rise and one to lower the volume.
  • +1 Repeat mode button: when activated, the current song will repeat forever until deativated.
  • +2 Shuffle functionality: the songs will play randomly instead of in order.
  • +5 Implement slider timeline: The slider will move with the song accordingly, if clicked the song will jump to that time.

Goal

4Geeks Coding Projects tutorials and exercises for people learning to code or improving their coding skills

Difficulty

intermediate

Repository

Click to open

Video

Not available

Live demo

Not available

Average duration

16 hrs

Technologies

All rights reserved, 4Geeks LLC 2021. Read more about 4Geeks and what we are going here.