Skip to content

Now Playing Pro

Now Playing with a live waveform from the real audio, an up-next queue and smooth transitions between tracks.

On this page
Used for
  • A player with a live waveform that follows the real audio
  • A queue under the player: tap any row to play it
  • DJ-style track changes: the end of one song overlaps the start of the next

Examples

Mid-transition

Listen

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

audio
HTMLAudioElement | null
The element whose level drives the bars (useAudioPlayer().audio).
queue / currentId / onSelect
QueueItem[] / string / (item) => void
The up-next list inside the card.
smooth / onSmoothChange
boolean / (v) => void
The Smooth transitions switch. No handler, no switch.
mix / nextTrack
Crossfade / track
What useCrossfade reports and the track being mixed in.
useCrossfade({ current, next, duration, curve, bpm, beatOffset, enabled, onDone })
Crossfade
Default6s, equal-power
Two audio elements through two gain nodes. Starts `duration` seconds before the end, or the bar before that when `bpm` is given.
useAudioLevels(audio, active, bars)
number[] | undefined
Default5 bars
The level of an audio element, one array per frame.

What is not included: finding a file's tempo, and stretching one track to match the other. Both need a signal-processing engine, usually WebAssembly, which is a different size of dependency than a UI kit should ship. Give the tempo as `bpm` when you know it.

What it handles

  1. 01Reads the audio's level with an AnalyserNode and feeds it to the bars, one value per frame. Reduced motion keeps the calm static bars.
  2. 02Lists an up-next queue inside the open card. Rows are buttons, the playing row is marked.
  3. 03Smooth transitions: with the toggle on, the next track starts under the current one `duration` seconds before its end (6 by default), and the gains cross on an equal-power curve so the loudness stays even. The card shows both covers, a "Mixing into" line and the curve, and the scrubber marks the mix zone.
  4. 04With a `bpm` the start snaps back to the bar before it, so the tracks change on a downbeat.

States

Mix zone
The end of the scrubber is marked
none
Mixing
Old cover fades out, new cover fades in, the curve shows where you are
follows the audio
Reduced motion
Static bars; the transition itself still happens, it is audio
0ms

Works with

When to use

When to use

  • A player with bars that follow the real audio and an up-next queue.
  • Track changes that overlap, so a playlist flows instead of stopping between songs.

When not to use

  • A basic player with static bars: use Now Playing.
  • Tempo detection or beat matching: give the bpm you know.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Now Playing Pro to my app and wire it to my own data.
  • I need a player with bars that follow the real audio and an up-next queue. Set that up with the Knowns UI Now Playing Pro.
  • Which Now Playing Pro props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "now-playing-pro" }) and search_docs({ query: "now playing pro" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Now Playing Pro, or found something off? We read every message.