npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stronk-tech/react-librespot-controller

v0.2.3

Published

`go-librespot` squeezebox-alike web frontend for small touchscreens

Downloads

43

Readme

react-librespot-controller

NPM NPM NPM NPM GitHub License Dependabot Updates

A squeezebox-alike React frontend for controlling go-librespot.

Use it as:

  • a standalone page for touchscreens
  • an embedded component in internal dashboards

UI Scope

  • Layout modes: auto, default, widescreen, portrait
  • Views: Info, Playlists, Queue, Settings
  • Interactive album art card: tap to browse the current album, playlist, or show
  • In-app navigation from now playing metadata to album, artist, and show details
  • Browse playlists: view tracks with lazy-loaded metadata, play individual tracks
  • Browse artists: portrait image, biography, top tracks, albums, singles, related artists
  • Browse albums: tracklist with durations, explicit badges, clickable artist links
  • Browse shows: episodes with durations and publish dates
  • Playlist cards with cover art, name, description, owner, track count
  • Paginated playlist loading with infinite scroll
  • Client-side image URL normalization for Spotify CDN compatibility
  • Comes with a set of preset themes and sleep timer
  • Podcast controls include skip back 15s and skip forward 30s

Backend Requirements

This UI needs a go-librespot instance with:

  • HTTP API: player controls, metadata endpoints (/metadata/rootlist, /metadata/playlist/{id}, /metadata/track/{id}, /metadata/album/{id}, /metadata/artist/{id}, /metadata/show/{id}, /metadata/episode/{id})
  • WebSocket event stream at /events
  • All metadata is fetched via Spotify's native Mercury/protobuf protocols (no Spotify Web API keys needed)

Standalone Setup

Create a .env file:

REACT_APP_API_BASE_URL=http://apollo:3678
REACT_APP_WS_URL=ws://apollo:3678/events
REACT_APP_KIOSK_MODE=false
REACT_APP_HIDE_ON_DISCONNECT=false
REACT_APP_LAYOUT=auto

Install and run:

npm install
npm run test
npm run static
npm run build

Commands:

  • npm run test: starts the local demo app
  • npm run static: creates the static app build
  • npm run build: builds the npm package output in dist/

Module Setup

Install:

npm install --save @stronk-tech/react-librespot-controller

Use:

import MediaPlayer from "@stronk-tech/react-librespot-controller";

<MediaPlayer
  websocketUrl="ws://apollo:3678/events"
  apiBaseUrl="http://apollo:3678"
  hideOnDisconnect={false}
  kioskMode={false}
  layout="auto"
  maxHeight="70vh"
  mobileBreakpoint={768}
  theme="tokyo-night"
/>;

Embedding

The player sizes itself automatically via CSS aspect-ratio. Height is derived from available width per layout mode — tab content scrolls internally and never resizes the outer card.

<div style={{ width: "100%", overflow: "hidden" }}>
  <MediaPlayer websocketUrl="ws://apollo:3678/events" apiBaseUrl="http://apollo:3678" />
</div>

Override the max-height cap or panel scroll height with CSS vars:

.my-wrapper {
  --spotify-player-max-height: 70vh;
  --spotify-player-panel-max-height: 48vh;
}

Props

  • websocketUrl: WebSocket URL for go-librespot events
  • apiBaseUrl: HTTP API base URL for go-librespot
  • hideOnDisconnect: hides the component when API connection is down
  • kioskMode: uses full-screen behavior
  • autoDetectKiosk: auto-enables kiosk mode when card fills most of viewport (default false)
  • layout: auto, default, widescreen, portrait
  • maxHeight: maximum component height cap (CSS value, default 100vh)
  • panelMaxHeight: maximum height for scrollable content panels like playlists/details (default 60vh)
  • mobileBreakpoint: when layout="auto", force portrait at or below this viewport width (default 768)
  • theme: optional preset name; if omitted, saved theme is used, default is tokyo-night

Theme Presets

tokyo-night, tokyo-night-light, dracula, nord, catppuccin, catppuccin-light, gruvbox, gruvbox-light, one-dark, github-dark, rose-pine, solarized, solarized-light, ayu-mirage

Preview

Browse Flow

Default view / Kiosk mode

Default

Widescreen

Widescreen

Portrait

Portrait

Queue

Queue

Settings

Settings

Browse

Browse Artist