- Play songs from a playlist.
- Display the currently playing song.
- Pause and resume the currently playing song.
- Go back to the previous song.
- Skip to the next song in the playlist.
- Shuffle the songs included in the playlist.
Here are a few specifics about some less obvious parts of this application:
- Shuffle: When toggled on, the player should play all the songs in random order before replaying any song.
- Next: If shuffle is toggled on, the
Next
button should start playing the next song in the randomized order. If shuffle is not toggled on,Next
should start the next song in the playlist. When the last song is playing,Next
should start again from the beginning. - Previous:
Previous
button always plays the last song played before the currently playing song.
If you come across some corner cases that are not addressed here, please use your best judgement to decide on what should happen. What do you think would be the best user experience?
- Using the HTMLAudioElement instead of Howler
- The playlist functionality is based on managing indices of existing songs
- If an audio url contains an error, the song is skipped (and not remembered as previously played)
- If an image representing an album cover does not load, a default image is served
- The player is responsive
The following has been setup in the mocha test environment:
- mocha
- chai matchers
- jsdom
- enzyme
- babel-polyfill
As well, app/
has been added to the runtime path, so you can do things like:
import App from 'components/App'
inside your tests.
The repository is ready to go with a brunch configuration to build and serve a development version of the page with React.
Use of Node 13 recommended for this project.
Run npm install
to download the dependencies, and then npm start
then open the browser to http://localhost:3333
As currently configured, the starting point for brunch is at app/assets/index.html
.