Media · Gutenberg

Audio Player block for WordPress

Custom-styled audio player with cover art, track info, and branded controls. Perfect for podcasts and soundclips.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Custom-styled audio player with cover art, track info, and branded controls. Perfect for podcasts and soundclips.

Inspector panels on this block: Audio File, Track Info, Cover Art, Controls, Player Style. Those titles come from index.js, not from a shared template.

Behavior controls: “Preload” options: Metadata (recommended), Auto (load fully), None (on demand); “Player Style — Style” options: Card, Minimal (bar), Compact; “Box Shadow” options: None, Small, Medium, Large.

Where to find it

Gutenberg inserter → Media → search “Audio Player” (block name `blockenberg/audio-player` in block.json). Style it in the sidebar after insert.

How to use Audio Player block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Audio Player”, insert it. Category: Media.
  3. Configure inspector controls that exist on this block. Open Audio File. Set “Audio URL (mp3/ogg/wav)”, “Preload”, “Autoplay”, “Loop”.
  4. Check the published page. The view script reads HTML data attributes: data-audio-type, data-audio-url, data-autoplay, data-loop, data-preload, data-show-speed, data-show-volume. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Audio URL (mp3/ogg/wav)Text field in the inspector. Saved as `audioUrl`.
PreloadSelect control; the chosen value is saved on the block. Options: Metadata (recommended); Auto (load fully); None (on demand). block.json default: metadata. Saved as `preload`.
AutoplayOn/off toggle in the inspector. Off by default. Saved as `autoplay`.
LoopOn/off toggle in the inspector. Off by default. Saved as `loop`.
Track TitleText field in the inspector. block.json default: Track Title. Saved as `audioTitle`.
Artist NameText field in the inspector. block.json default: Artist Name. Saved as `audioArtist`.
AlbumText field in the inspector. Saved as `audioAlbum`.
Show TitleOn/off toggle in the inspector. On by default. Saved as `showTitle`.
Show ArtistOn/off toggle in the inspector. On by default. Saved as `showArtist`.
Show AlbumOn/off toggle in the inspector. Off by default. Saved as `showAlbum`.
Show Cover ArtOn/off toggle in the inspector. On by default. Saved as `showCover`.
Cover Image URLText field in the inspector. Saved as `coverUrl`.
Cover Size (px)Numeric range control in the inspector. Range 40–200. block.json default: 80. Saved as `coverSize`.
Cover Border Radius (px)Numeric range control in the inspector. Range 0–50. block.json default: 8. Saved as `coverRadius`.
Show TimestampOn/off toggle in the inspector. On by default. Saved as `showTimestamp`.
Show Volume ControlOn/off toggle in the inspector. On by default. Saved as `showVolume`.
Show Playback SpeedOn/off toggle in the inspector. Off by default. Saved as `showSpeed`.
Show Download ButtonOn/off toggle in the inspector. Off by default. Saved as `showDownload`.
Play Button Size (px)Numeric range control in the inspector. Range 32–80. block.json default: 52. Saved as `playButtonSize`.
Progress Bar Height (px)Numeric range control in the inspector. Range 2–12. block.json default: 4. Saved as `progressHeight`.
Player Style — StyleSelect control; the chosen value is saved on the block. Options: Card; Minimal (bar); Compact. block.json default: card. Saved as `playerStyle`.
Box ShadowSelect control; the chosen value is saved on the block. Options: None; Small; Medium; Large. block.json default: md. Saved as `boxShadow`.
Player Border Radius (px)Numeric range control in the inspector. Range 0–40. block.json default: 14. Saved as `playerRadius`.
Vertical Padding (px)Numeric range control in the inspector. Range 8–60. block.json default: 20. Saved as `playerPaddingV`.
Horizontal Padding (px)Numeric range control in the inspector. Range 8–60. block.json default: 24. Saved as `playerPaddingH`.
Max Width (px)Numeric range control in the inspector. Range 200–1200. block.json default: 560. Saved as `maxWidth`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Audio Player block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Audio Player”. It sits under Media. After insert, open Audio File and set “Audio URL (mp3/ogg/wav)”, “Preload”, “Autoplay”, “Loop”.

What makes Audio Player different from other Blockenberg blocks?

Custom-styled audio player with cover art, track info, and branded controls. Perfect for podcasts and soundclips. Inspector labels on this block include “Audio URL (mp3/ogg/wav)”, “Preload”, “Autoplay”, “Loop”.

Is the Audio Player Gutenberg block free?

Yes. Audio Player ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Audio Player to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Audio File, Track Info, Cover Art, Controls).

Related media blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Audio Player from the Gutenberg inserter.

Get Blockenberg