A beautiful pastel-themed music player with modern features and an intuitive interface.
- Play/Pause/Previous/Next track navigation
- Progress bar with seek functionality (click to jump)
- Real-time time display (current/duration)
- Volume control slider with mute option
- Auto-play next song in playlist
- Drag and drop multiple audio files
- Click to browse and add songs
- Visual playlist sidebar with song list
- Save playlists for later use
- Load previously saved playlists
- Delete individual songs from playlist
- Click any song to play it instantly
Space- Play/PauseArrow Right- Next trackArrow Left- Previous trackArrow Up- Increase volumeArrow Down- Decrease volumeN- Next trackP- Previous track
- Pastel pink and purple color scheme
- Dynamic background images that change with songs
- Dynamic cover images (10 different covers cycle through songs)
- Smooth animations and transitions
- Responsive design
- Custom styled scrollbars
File: index.html
How to run:
- Simply open
index.htmlin any modern web browser - Or double-click the file to open it in your default browser
Features:
- No installation required
- Works immediately
- Drag & drop audio files or click to browse
- Supports multiple audio formats (MP3, WAV, OGG, etc.)
Files: Musicplayer.html, main.js, preload.js
Requirements:
- Node.js and npm must be installed
How to run:
- Install Node.js from https://nodejs.org/
- Open terminal in the musicplayer folder
- Run:
npm install - Run:
npm start
- Start the Player: Open
index.htmlin your browser (recommended) - Add Music:
- Drag and drop audio files onto the player, OR
- Click anywhere on the player to browse files
- Add multiple files at once
- Control Playback:
- Use ⏮ ▶ ⏭ buttons to control playback
- Click progress bar to seek
- Adjust volume with slider
- Use keyboard shortcuts for quick control
- Manage Playlist:
- View all songs in the sidebar
- Click any song to play it
- Delete songs with the × button
- Save playlists with button
- Load saved playlists with button
- Clear all with button
- Enjoy: Songs auto-play in sequence with changing backgrounds!
musicplayer/
├── index.html # Browser version (recommended)
├── Musicplayer.html # Electron version HTML
├── script-browser.js # Browser version JavaScript
├── script.js # Electron version JavaScript
├── style.css # Shared styling (pastel theme)
├── main.js # Electron main process
├── preload.js # Electron preload script
├── package.json # Node.js dependencies
├── Assets/
│ ├── images/ # Cover images and backgrounds
│ └── Songs/ # Sample music files (optional)
├── README.md # This file
└── .gitignore # Git ignore file
- HTML5: Structure and Audio API
- CSS3: Styling with gradients, animations, and flexbox
- Vanilla JavaScript: No frameworks, pure JS
- File API: Drag-and-drop and file handling
- localStorage: Save playlist metadata
- IndexedDB: (Future) Store audio files persistently
- Electron (optional): Desktop application wrapper
Works in all modern browsers:
- Chrome/Edge (recommended)
- Firefox
- Safari
- Opera
- Complete IndexedDB integration for persistent audio storage
- Shuffle and repeat modes
- Equalizer controls
- Search/filter songs
- Multiple playlist management
- Song metadata display (artist, album)
This is a learning/portfolio project. Feel free to fork and customize!
MIT License - feel free to use and modify!
Enjoy your music!