valamp
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
index.http.ts
https://all--a79d220d6343412594b1eeb565c5b116.web.val.run
An interface for playing MP3s and managing playlists.
- Terminal-style command interface
- Play MP3s from URLs
- Create and manage multiple playlists
- Basic playback controls (play, pause, stop, volume)
- Playlist navigation (next, previous)
play <url>
- Play an MP3 from URLpause
- Pause current trackstop
- Stop current trackvolume <0-100>
- Set volumeplaylist create <name>
- Create new playlistplaylist add <name> <url> [title]
- Add track to playlistplaylist load <name>
- Load and play playlistplaylist list
- Show all playlistsplaylist show <name>
- Show tracks in playlistplaylist delete <name>
- Delete playlistnext
- Play next track in playlistprev
- Play previous track in playlisthelp
- Show all commandsclear
- Clear terminal
In terminal enter asdf
to show editor panels.
in frontend/index.tsx
// Configuration
const CONFIG = {
ALLOW_PLAYLIST_DELETION: true, // Set to false to prevent playlist deletion
ALLOW_TRACK_DELETION: true // Set to false to prevent track deletion
};
# Create a new playlist $ playlist create "My Favorites" # Add tracks to the playlist (you'll need real MP3 URLs) $ playlist add "My Favorites" https://example.com/song1.mp3 "Song Title 1" $ playlist add "My Favorites" https://example.com/song2.mp3 "Song Title 2" # Load and play the playlist $ playlist load "My Favorites" # Control playback $ pause $ volume 75 $ next $ prev # View playlists $ playlist list $ playlist show "My Favorites"
├── frontend/
│ ├── index.html # Main HTML with terminal interface
│ ├── index.tsx # React terminal component
│ └── style.css # Terminal styling
├── shared/
│ └── types.ts # Shared TypeScript types
└── backend/
└── index.ts # Static file server