A simple, kid-friendly web application for playing music. Features a colorful grid of song thumbnails that kids can tap to play songs. No complicated buttons or controls - just tap and play!
- π¨ Colorful, kid-friendly interface
- π± Touch-friendly grid layout
- π΅ Simple tap-to-play interaction
- β¨ Visual feedback when songs are playing
- π± Responsive design for tablets and phones
- π« No complicated controls or buttons
kidsplayer/
βββ index.html # Main application file
βββ songs.json # Song configuration (optional)
βββ assets/
β βββ songs/ # Place your MP3 files here
β β βββ song1.mp3
β β βββ song2.mp3
β β βββ ...
β βββ thumbnails/ # Place your thumbnail images here
β βββ song1.jpg
β βββ song2.jpg
β βββ ...
βββ README.md
- Copy your MP3 audio files to the
assets/songs/folder - Name them:
song1.mp3,song2.mp3,song3.mp3, etc.
- Create or find thumbnail images for each song (JPG, PNG, or GIF)
- Copy them to the
assets/thumbnails/folder - Name them to match your songs:
song1.jpg,song2.jpg, etc. - Recommended size: 500x500 pixels or larger
Edit the songs.json file in the project root:
[
{
"id": "song1",
"title": "Happy Song",
"audioFile": "song1.mp3",
"thumbnail": "song1.jpg"
},
{
"id": "song2",
"title": "Dance Time",
"audioFile": "song2.mp3",
"thumbnail": "song2.jpg"
}
]id: Unique identifier for the songtitle: The display name shown to kidsaudioFile: The MP3 filename inassets/songs/thumbnail: The image filename inassets/thumbnails/
If you have Python installed:
# Python 3
python -m http.server 8000
# Python 2
python -m SimpleHTTPServer 8000Then open: http://localhost:8000
npx http-server -p 8000php -S localhost:8000- Raspberry Pi (any model with network connectivity)
- Raspberry Pi OS installed
- Network connection (WiFi or Ethernet)
- Update your Raspberry Pi:
sudo apt update
sudo apt upgrade -y- Install a web server (choose one):
Option A: Nginx (Recommended)
sudo apt install nginx -yOption B: Apache
sudo apt install apache2 -y- Copy the application:
For Nginx:
sudo cp -r /path/to/kidsplayer/* /var/www/html/
sudo chown -R www-data:www-data /var/www/html/
sudo chmod -R 755 /var/www/html/For Apache:
sudo cp -r /path/to/kidsplayer/* /var/www/html/
sudo chown -R www-data:www-data /var/www/html/
sudo chmod -R 755 /var/www/html/- Start the web server:
Nginx:
sudo systemctl start nginx
sudo systemctl enable nginxApache:
sudo systemctl start apache2
sudo systemctl enable apache2- Find your Raspberry Pi's IP address:
hostname -I- Access the app:
From any device on your local network, open a web browser and go to:
http://[YOUR_PI_IP_ADDRESS]
For example: http://192.168.1.100
To always access your Pi at the same address:
- Edit the DHCP config:
sudo nano /etc/dhcpcd.conf- Add at the end:
interface wlan0
static ip_address=192.168.1.100/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
- Restart:
sudo rebootEdit the CSS in index.html:
body {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
/* Change these hex colors */
}Adjust the grid template in the CSS (in index.html):
.grid {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
/* Change 250px to make cards bigger/smaller */
}Edit the <h1> tag in index.html:
<h1>π΅ My Music π΅</h1>Simply edit songs.json - add or remove song objects. The app will automatically load all songs from this file.
- MP3 (recommended - best compatibility)
- WAV
- OGG
- M4A
- JPG/JPEG (recommended)
- PNG
- GIF
- WebP
- JIFF/JFIF
- Check that audio files are in
assets/songs/folder - Verify filenames in
songs.jsonmatch actual files exactly (case-sensitive on Linux/Pi) - Ensure MP3 format is used
- Make sure
songs.jsonexists and is valid JSON - Check browser console for errors (F12)
- Verify images are in
assets/thumbnails/folder - Check filenames in
songs.jsonmatch actual image files - A colored placeholder will show if image is missing
- Verify the Pi is on the same network
- Check firewall settings
- Ensure web server is running:
sudo systemctl status nginx
- Run:
sudo chmod -R 755 /var/www/html/ - Run:
sudo chown -R www-data:www-data /var/www/html/
- Chrome/Chromium (recommended)
- Firefox
- Safari
- Edge
- Any modern mobile browser
- Use bright, colorful images that kids will recognize
- Keep song titles short and simple
- Test on a tablet in kiosk mode for a dedicated music player
- Consider using a tablet stand for easy access
Free to use and modify for personal and educational purposes.
Enjoy! π