Quick Start Guide
Get Player2 running locally in just a few minutes.Prerequisites
Before you begin, ensure you have:Node.js
Version 16 or higher
Package Manager
npm or yarn
Spotify Account
Premium account required
Spotify Developer App
API credentials from Spotify Dashboard
Installation
Configure Environment Variables
Create a Then add your Spotify API credentials:
.env file from the example template:.env
Start the Development Server
Run the development server:The application will be available at
http://localhost:5173Connect to Spotify
Open your browser and navigate to
http://localhost:5173. You’ll be prompted to:- Log in to your Spotify account
- Authorize Player2 to access your playback
- Start playing music!
Player2 requires these Spotify scopes:
user-read-playback-state- Read your currently playing trackuser-modify-playback-state- Control playbackuser-library-read- Access your saved tracks
Using Player2
Basic Controls
Once connected, you can control your Spotify playback:- Play/Pause - Click the play button or press
Space - Skip Forward - Click next button or press
→(Right Arrow) - Skip Back - Click previous button or press
←(Left Arrow) - Seek - Drag the progress slider (hover over album art)
Features
Real-Time Lyrics
Real-Time Lyrics
Click the lyrics button to toggle synchronized lyrics display. Lyrics are automatically fetched from LRCLIB and scroll in real-time with the music.
LyricsDisplay component
Search Music
Search Music
Use the search feature to find and play songs, albums, or artists directly from the interface.
Queue Management
Queue Management
Click the queue icon to view your current playback queue. You can reorder tracks with drag-and-drop.
Your Library
Your Library
Access your saved tracks by clicking the heart icon. The library supports infinite scroll for large collections.
Context Menus
Context Menus
Build for Production
To create a production-optimized build:Troubleshooting
Missing Spotify Credentials Error
Missing Spotify Credentials Error
If you see “Missing Spotify Credentials”, ensure:
- Your
.envfile exists in the project root - Environment variables are prefixed with
VITE_ - You’ve restarted the development server after creating
.env
Authorization Failed
Authorization Failed
No Playback Control
No Playback Control
Player2 requires an active Spotify playback session. Make sure:
- You have Spotify Premium
- You’re playing music on a Spotify device
- The Spotify app or web player is open
Next Steps
Detailed Setup
Learn more about Spotify Developer setup, environment configuration, and deployment options.