Building MusicPliz โ€” A YouTube Music Player for the Web

2026-07-07

When I set out to build MusicPliz, the goal was simple: create a web-based music player that streams real audio from YouTube Music, with a UI that feels as polished as Spotify.

The Tech Stack

The Challenge: Audio Streaming

The hardest part was audio. YouTube doesn't give you direct audio URLs โ€” they need to be "deciphered" from streaming data. YouTube.js does this internally, but it requires a JavaScript interpreter to run the player's decipher function. Without one, streaming_data.adaptive_formats URLs come back empty.

The solution? yt-dlp. It's a Python tool that handles all of YouTube's anti-scraping measures. I integrated it into the proxy server:

const child = execFile('yt-dlp', [
  '-f', 'bestaudio[ext=m4a]/bestaudio',
  '--get-url',
  `https://www.youtube.com/watch?v=${videoId}`,
], cb);

This returns a real, playable audio URL that works in any browser's element.

The Design

I redesigned the UI to match Spotify's web player:

What's Next

The full source is on GitHub.