Skip to content

Now-Playing Card

Give the current track a place on your desktop. This card brings together artwork, title, artist, and playback state, and stays useful even when a player never sends timeline events.

Install the packages from the quick start, then copy these three files. Each tab contains one complete file.

vite.config.ts
import { defineConfig } from 'vite';
import { wallpaperEnginePlugin } from 'wallpaper-engine/plugin';
export default defineConfig({
plugins: [wallpaperEnginePlugin({ title: 'Now Playing' })],
});

Each callback updates only the fields it owns, so artwork and playback do not depend on metadata arriving first. Metadata is assigned with textContent. Artwork uses the host-provided data URL directly, and playback is resolved from host constants through the helper rather than hard-coded integers.

Run bun x vite, then open Media in the devtools panel:

  1. Enable media integration to reveal the card.
  2. Edit the title and artist, then choose Send metadata.
  3. Change playback between playing, paused, and stopped.
  4. Select a local image and send the prepared artwork.
  5. Disable integration and confirm that the card hides and clears its content.

Selected simulator artwork stays local to the browser. In Wallpaper Engine, media integration must be enabled in the application settings and the active player must supply media data. See the Media guide to add an optional progress timeline or use the thumbnail’s palette colors.