Skip to content

HarmanSingh79/LocalSpotifyPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎡 Local Spotify Player

A minimalistic, responsive web-based music player that streams songs directly from your local folders. Designed with a user interface inspired by Spotify, this project allows you to organize your local music library into albums and listen to them on both desktop and mobile devices.

🌟 Features

  • Dynamic Library Parsing: Automatically detects any number of subfolders (Albums) within the main songs directory and lists the audio files inside them.
  • Spotify-Inspired UI: A clean, dark-themed interface with a sidebar and main content area.
  • Full Playback Control:
    • Play/Pause toggle.
    • Interactive Seekbar to skip through songs.
    • Volume Rocker for audio adjustment.
    • Next/Previous track functionality.
  • Responsive Design:
    • Desktop: Full sidebar and player view.
    • Mobile: Collapsible Hamburger menu and optimized touch controls.
  • Local Server: Runs on your local machine using your file system as the database.

πŸ› οΈ Tech Stack

  • HTML5 - Structure and layout.
  • CSS3 - Flexbox/Grid, Media Queries, and Spotify-themed styling.
  • JavaScript (Vanilla) - Audio new Audio() API, DOM manipulation, and event listeners.

πŸ“‚ Folder Structure

Ensure your project is structured exactly like this so the script can find your music:

/Local-Spotify-Player
  β”œβ”€β”€ index.html
  β”œβ”€β”€ style.css
  β”œβ”€β”€ script.js
  β”œβ”€β”€ README.md
  β”œβ”€β”€ .gitignore          <-- See 'Installation' below
  └── songs/              <-- Create this folder manually
      β”œβ”€β”€ Rock Classics/
      β”‚   β”œβ”€β”€ song1.mp3
      β”‚   └── song2.mp3
      β”œβ”€β”€ Pop Hits/
      β”‚   β”œβ”€β”€ track1.mp3
      β”‚   └── track2.mp3
      └── ...


βš™οΈ Installation & Setup
1. Clone the Repository
git clone [https://github.com/your-username/local-spotify-player.git](https://github.com/your-username/local-spotify-player.git)
cd local-spotify-player<br>
2. Add Your Music
Create a folder named songs in the root directory.

Inside songs, create subfolders for your albums (e.g., songs/MyAlbum).

Paste your .mp3 files into those album folders.

3. Configure Git (Important)
To prevent your music files from being uploaded to GitHub (which violates copyright and bloats the repo), you must ignore the songs folder.

Create a file named .gitignore in the root directory.

Add the following line to it:
songs/
πŸš€ How to Run
Due to browser security policies (CORS), this project cannot run by simply opening index.html. You must use a local server.

Option A: VS Code Live Server (Recommended)
Open the project in VS Code.

Install the Live Server extension.

Right-click index.html and select "Open with Live Server".

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published