Building TAPENOVA × IR: A Retro Cassette and Vinyl Web Player
Most browser audio players do the minimum: a play button, a progress bar and a filename. If you care about how your music files actually look on paper, such as sample rate, bit depth and bitrate, or you simply miss the physical feel of tapes and records, there is not much on offer. TAPENOVA × IR is my attempt at a player that shows real file metadata and gives the music a retro body. It runs entirely in the browser, with no backend and no framework.
Why I built it
I wanted a player inspired by the Snowsky Echo Mini: a small, tactile device with a clear readout of what you are listening to. I also wanted to see how far plain HTML, CSS and vanilla JavaScript could go without a build step. The first release was in February 2026, and I have kept refining it since.
What it does
The player has two visual modes you can switch between:
- Cassette (Walkman): animated spinning reels, a hinged compartment lid that opens on load, album art on the cassette label, and a synthesised fast-forward scrub sound.
- Vinyl (Turntable): a spinning disc, a tonearm that tracks playback progress, album art mirrored onto the record label, and automatic parking of the tonearm when playback stops.
Around that sit the practical features:
- Drag-and-drop or a file picker for MP3, WAV, FLAC, AAC, OGG and M4A files.
- A playlist queue with click-to-jump, drag-to-reorder (or focus the handle and use the up/down arrow keys) and per-track removal. The queue, its order and your last-played track are stored in IndexedDB and restored on reload.
- Sample rate, bit depth and bitrate readouts that reset and repopulate on every track change.
- Dark and light themes saved in
localStorage, plus ambient colour orbs that react to the audio. - Media Session API support, so lock-screen, notification and headphone controls work with the track title and cover art.
- YouTube playback: paste a URL and audio streams through the IFrame API, with the seek bar and controls kept in sync.
- PWA installability on Android, iOS and desktop Chrome or Edge, with offline use.
How it works
The stack is three files of substance: index.html, style.css (around 1,800 lines) and script.js (around 1,190 lines), plus a service worker and a manifest.
The metadata pipeline
When a file is selected, two things happen. URL.createObjectURL() produces a URL for playback, and file.arrayBuffer() feeds three readers:
extractAlbumArt(), a hand-written ID3v2 frame parser with no library. It handles v2.2PICframes and v2.3/v2.4APICframes, and copes with UTF-8, UTF-16 and Latin-1 description fields.getWavBitDepth(), which reads the bit depth straight from bytes 34-35 of the WAVfmtchunk.audioContext.decodeAudioData(), which gives the sample rate and duration. Bitrate is then approximated as(file size × 8) / duration / 1000kbps.
The reason for reading headers yourself is that the browser's audio element exposes none of this. Bitrate is an approximation based on average file size, so it is not an exact per-frame figure.
Cassette animation
The reels use CSS @keyframes rotation. The tape strand is a horizontal div with an animated background-position. The reel fill works through border-width on .reel-tape: the left reel narrows and the right reel grows as the track progresses. The lid and cassette use rotateX and translateY, coordinated by a cassetteAnimating guard in JavaScript so overlapping animations do not fight each other.
Tonearm geometry
Rather than hard-code angles that break when the layout changes, the tonearm range is computed at runtime. The code sweeps from -90° to +90° and checks whether the stylus tip's bounding box falls inside the vinyl circle. Progress then maps linearly: fraction 0 to -45°, fraction 1 to 20°, with a parked angle of 10°. It is recalculated on resize.
Synthesised sounds and visuals
The cassette fast-forward scrub sound is pure Web Audio synthesis, a high-pitched whir with tape hiss, so no audio file is needed. A dedicated AudioContext stays alive across scrubs, while the nodes are created and destroyed per scrub. The ambient orbs use an AnalyserNode each animation frame; three orbs follow the bass, mid and treble bands, with opacity and scale smoothed by lerp coefficients of 0.08 and 0.12.
Offline and memory handling
The service worker pre-caches the core assets, including manifest.json, and uses stale-while-revalidate: cached files load immediately and refresh in the background. The app shell still opens offline even for a page that was never cached. For local files, blob URLs are revoked on every track change to avoid memory leaks.
What I learned
- Parse the bytes when the platform will not tell you. A small ID3 reader and a two-byte WAV header read were enough, and they removed the need for a dependency.
- Measure instead of hard-coding. Computing the tonearm range at runtime keeps the animation correct across screen sizes.
- Guard animations with state. A single boolean flag was the simplest way to stop the cassette eject and insert sequences from overlapping.
- Clean up object URLs. Revoking blob URLs on track change is easy to forget and matters in a player that handles large files.
- Secure contexts matter. The Web Audio features and service worker need
localhostor HTTPS, and openingindex.htmlas afile://URL disables some of them.
Try it
You can open the live player at https://tapenova-ir-ir.vercel.app. Load a few tracks, switch between cassette and vinyl, and install it as a PWA if you like. To run it locally, clone the repository and serve the folder with any static server, for example npx serve . or python3 -m http.server 8080. There is no build step.
Conclusion
TAPENOVA × IR shows that a fairly rich audio app fits in plain HTML, CSS and JavaScript: real metadata, themed animations, offline support and YouTube playback. If you build something similar, start with the metadata readers and the service worker, then add the visual flourishes on top.