- Start this single page application by opening index.html in your browser.
- Click on "load pre-defined music" and the default music is listed on the left side as single song elements.
- The first song automatically starts to play. For default the repeat mode will play song after song in order and start with 50% volume.
- Press pause to stop the music, keep playing or select another song by the skip buttons (previous/next) or via double click on the song element in interest.
- Use the volume slider to increase/decrease the volume or the progress slider to navigate to your prefered time spot of a song.
- Currently single song elements can not be removed but only the complete list with the "clear list x" button, which removes the whole list and the "load pre-defined music" field re-appears.
- repeat playlist continues to play in loop (
${\textsf{\color{yellowgreen}green}}$ button )
- shuffle playlist plays random chosen songs (
${\textsf{\color{skyblue}blue}}$ button )
As the music player is started, no music is loaded, as the first idea was to take music elements as an input from the user and play them. Therefore, the input field "load pre-defined music" is shown. Currently, the player loads a pre-defined list of songs and thumbnail images by clicking on the input field, referring to content inside path "./assets/demo-music" and "./assets/demo-thumbnail".
Default song: first in list
Default volume: 50%
Default progress: 0%
Default mode:
The progress bar [left] and volume bar [right] take input by moving the slider button to adjust values [time/volume].
Play or Pause button hide/appear depending on actively playing a song. The skip buttons to previous or next song work in both modes (shuffle/repeat). A song from the list can be pre-selected with normal
After a song is selected and starts to play, the regarding thumbnail will be shown in the detail section. Additionally, the title of the song will rotate endlessly and the current time progress as well as the total duration are shown below.
Meanwhile the first idea was to enable the user to select music from local storage via audio input in html, this feature was dismissed. Javascript doesn't allow on client side to access user directories. This is only possible from server side to access and would exceed the scope of this side project. Therefore, this music player as well as seen in many other repositories, this music player will use pre-defined music elements.
New scaling for resolution 300px > width > 1440px in 8 different steps in combination with flexbox styling ensures a responsive design to use on every device. Starting with v1.4.0 there are two modes. Firstly, the basic landscape mode for tablets and desktop devices to offer a higher screenwidth. Secondly, a new portrait oriented design offers a better handling for smaller devices or window sizes.
Firefox | Chrome | Opera | Edge | DuckGo | Brave |
Yes | Yes | Yes | Yes | Yes | Yes |
-
$\textsf{\color{green}Change:}$ Refactored small performance/security improvements.
- - error handling for music failing to load
- - error handling for thumbnails failing to load
- - enable removing single songs from list via trashbin icon
- - deploy a Web Application Manifest to make application a progressive web app (PWA)
- - load music from specified path (no more static data)
- - load metadata from music element and dispay (thumbnail, autor, genre, ...)