CamelPlug Audio Player Block

By shimiplug

0+ active installationsVersion 2.0.0

A fast, accessible audio player block: playlists, waveform, sticky mini player, 12 designs, 16 color presets, podcast controls and full styling.

Description

CamelPlug Audio Player Block adds a modern HTML5 audio player to the block editor. Pick a file from the Media Library (or paste any URL), choose a design and style it from the toolbar or sidebar — the editor shows the real, playable player.

Key Features

  • Toolbar Quick Pickers: Change Player Layout and Color Presets directly from the Gutenberg block toolbar with sleek vertical list previews powered by shimi-tools CustomPopover. Auto-closes on selection.
  • 12 Modern Player Layouts: Classic (1.0.0 look), Minimal (one clean line), Compact (sidebar-ready), Modern, Card (vertical artwork), Podcast (speed menu & skip), Waveform (SoundCloud-style), Album (cover + tracklist), Bar (slim full-width), Pill (inline preview), Vinyl (spinning record) and Cover (artwork as background).
  • 16 Curated Color Presets: Light, Dark, Midnight, Sunset, Forest, Rose, Ocean, Lavender, Coffee, Monochrome, Graphite, Luxe Gold, Neon, and the vivid gradients Aurora, Sunset Glow and Deep Sea.
  • Audio Playlists: Multi-track playlists with track numbers, artwork, track duration, and easy reordering.
  • Interactive Waveform: Generates real audio waveform peaks for SoundCloud-style audio visualization and seeking.
  • Sticky Mini Player: Floating audio bar stays pinned to the bottom of the screen while visitors scroll your content.
  • Full Playback Controls: Variable playback speed (0.5x to 3x), skip backward/forward (custom step), repeat (off / all / one), shuffle, volume slider and mute.
  • Responsive Design: Dedicated width, padding, margin, and typography controls for Desktop, Tablet, and Mobile devices.
  • Media Session API: Native lock screen, headphone, and notification center controls with track metadata and album artwork.
  • Per-Track Download: Optional download buttons for single audio or individual playlist tracks.
  • Ultra Lightweight: Pure vanilla JavaScript on the frontend (~14 KB JS, ~5 KB CSS gzipped), zero jQuery, zero React runtime overhead.
  • Shortcode Support: Use [camelplug_audio_player] in Classic Editor, widgets, or page builders.

Players and sources

  • Single audio or playlist (any number of tracks, reorder them with the up/down buttons).
  • Media Library or external URLs: MP3, WAV, OGG, M4A/AAC, FLAC and WebM — whatever the visitor’s browser can play.
  • Title, artist, album, description and cover artwork, filled automatically from the file’s ID3 data when you pick it from the Media Library.
  • 12 designs: Classic, Minimal, Compact, Modern, Card, Podcast, Waveform, Album, Bar, Pill, Vinyl and Cover.
  • 16 color presets with instant one-click apply and fine-tuning options.

Playback

  • Play/pause, previous/next, skip backward/forward (custom step), seek bar with buffered indicator, current time, duration and remaining time.
  • Volume slider and mute, default volume.
  • Playback speed menu with a default speed and your choice of speeds.
  • Repeat (off / all / one), shuffle, automatic next track, repeat playlist.
  • Autoplay, muted start, preload options. Browser autoplay rules are respected: when blocked, the player waits for a click.

Advanced

  • Waveform progress bar from the real audio data (generated in the editor and saved with the block).
  • Sticky mini player at the bottom of the screen while audio plays and the player is scrolled away.
  • Resume where the visitor left off (stored only in the visitor’s browser).
  • Lock screen / headset / notification controls with artwork (Media Session API).
  • Pause other players automatically, keyboard shortcuts, download button (per player and per track).
  • Responsive: width, padding, margin and font sizes per device, hide volume/artwork/description on phones, automatic compact arrangement in narrow columns.
  • Shortcode for the classic editor and page builders.

Fast and accessible

  • No jQuery, no React and no external services on the frontend: about 14 KB of JavaScript and 5 KB of CSS (gzipped), loaded only on pages with a player.
  • Real buttons and sliders with labels, keyboard support and visible focus.

Shortcode

[camelplug_audio_player src="https://example.com/song.mp3" title="Song" artist="Band" cover="https://example.com/cover.jpg" layout="modern"]

Playlist: [camelplug_audio_player urls="https://…/one.mp3, https://…/two.mp3" titles="One, Two" playlist_title="My mix" layout="card"]

Attributes: src, title, artist, album, cover, description, urls, titles, playlist_title, layout (classic, minimal, compact, modern, card, podcast, waveform, album, bar, pill, vinyl, cover), download, autoplay, loop, waveform, sticky, speed (yes/no), width.

External services

The frontend player uses no external services. When you choose a Google Font in the Typography settings and keep “Load Google Font” on, the font stylesheet is loaded from Google Fonts (https://fonts.googleapis.com) on pages with that player. Google’s privacy policy: https://policies.google.com/privacy

License

This plugin is licensed under the GPLv2 (or later).

Installation

  1. Upload the plugin folder to the /wp-content/plugins/ directory, or upload the zip from Plugins → Add New → Upload Plugin.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Open the block editor and insert CamelPlug Audio Player Block.

FAQ

Will my existing players change after updating?

No. Blocks created with previous versions keep their settings and render with their selected design. New features are available in the toolbar and sidebar.

Why does autoplay not start?

Browsers block autoplay until the visitor interacts with the site. The player then waits for a click. This cannot be bypassed by any plugin.

Why is the waveform an approximation for some files?

The waveform is read from the audio data. Files hosted on another domain can only be read when that server allows it (CORS); otherwise an approximate shape is shown. It still works as a seek bar.

Does it work with any theme?

Yes. All player styles are scoped to the block and theme button styles are reset inside the player.

Does the download button work for files on other domains?

Browsers ignore the download filename for other domains. The player then downloads the file when the server allows it (CORS) or opens it in a new tab.

Changelog

2.0.0

  • New: Player Layout picker directly in Gutenberg block toolbar with vertical list and schematic previews.
  • New: Color Presets picker directly in Gutenberg block toolbar with vertical list and live swatches.
  • New: Auto-close dropdown behavior when selecting layouts or color presets in toolbar for faster workflow.
  • Improved: Integrated with shimi-tools CustomPopover component for seamless block editing.
  • Fixed: Album layout track info and title letter wrapping on narrow containers.
  • Fixed: Cover layout background gradient visibility and waveform class conflict.
  • Improved: Enhanced layout preset configurations and responsive CSS styling.

1.1.0

  • New: playlists, 12 designs, 16 color presets, waveform, sticky mini player, speed menu, repeat/shuffle, skip controls, resume position, Media Session, keyboard shortcuts, per-track download, responsive settings, shortcode.
  • New: General / Style sidebar with full styling (colors, typography, buttons, progress, volume, playlist, artwork, border, shadow, spacing per device).
  • Improved: lightweight vanilla JavaScript player (React and the Iconify icon service are no longer loaded).
  • Fixed: border width and border color settings are applied.
  • Existing 1.0.0 blocks keep working without changes.

1.0.0

  • Initial release.