---
title: Podcast Audio Player
menu_group: Front-end
menu_order: 75
tab: —
tab_order: 10
requires_podcasts: true
summary: Embed a polished podcast episode audio player via shortcode, Gutenberg block, Elementor, or the default episode template.
---

# Podcast Audio Player

The MediaBlaster **Podcast Audio Player** embeds episode audio on WordPress pages using a single PHP renderer. All integrations (shortcode, Gutenberg block, Elementor widget, and the public episode template) call the same code path, so playback, premium locking, and styling stay consistent.

**Requires:** **Enable Podcasts** on [General Settings](general-settings.md).

## What it does

- Resolves audio from the episode’s canonical source (upload or external URL) via `Wp_Smart_Tv_Podcast_Tools`
- Renders accessible markup with a native `<audio>` element and custom controls (play/pause, skip ±15s/30s, progress, speed)
- Respects **premium** episodes: locked message only — **no audio URL** in HTML for unauthorized public viewers
- Enqueues scoped CSS/JS only when the player appears on the page

See also: [Podcast Episodes](podcast-episodes.md) for configuring episode media.

## Shortcodes

**Preferred:**

```
[mediablaster_audio_player]
```

**Aliases (same behavior):**

```
[mediablaster_podcast_player]
[wpst_audio_player]
```

### Examples

Current episode (on a single `podcast_episode` page):

```
[mediablaster_audio_player]
```

Specific episode:

```
[mediablaster_audio_player id="123"]
```

With options:

```
[mediablaster_audio_player id="123" style="compact" theme="dark" show_download="true"]
```

## Gutenberg block

- **Block name:** `mediablaster/audio-player`
- **Title:** MediaBlaster Audio Player
- **Category:** Widgets

In the block sidebar, set **Podcast Episode ID** and toggle display options (artwork, title, skip controls, speed, etc.). Without an episode ID, the editor shows a placeholder; the frontend renders nothing until an ID is set (or use the block on an episode page with ID `0` and rely on the current post — set the ID in the sidebar to the episode’s post ID for explicit previews).

Frontend HTML is generated server-side on each request (dynamic block).

## Elementor widget

When Elementor is active, find **MediaBlaster Audio Player** under the **MediaBlaster** category (or General).

Controls mirror the shortcode options: episode ID, display toggles, style, theme, and extra CSS class. The canvas preview uses the same PHP renderer as the live site.

## Episode template

Public single episode pages (`single-podcast-episode.php`) use the audio player automatically for playable audio media. Video and oEmbed media are unchanged.

## Attributes and options

| Attribute / option | Default | Values | Description |
| ------------------ | ------- | ------ | ----------- |
| `id` | current post ID | post ID | `podcast_episode` post ID |
| `show_artwork` | `true` | bool | Episode or show artwork |
| `show_title` | `true` | bool | Episode title |
| `show_show_name` | `true` | bool | Linked podcast show name |
| `show_description` | `false` | bool | Excerpt or trimmed show notes |
| `show_meta` | `true` | bool | Date, duration, episode type |
| `show_download` | `false` | bool | Download link (only when audio is playable) |
| `show_speed` | `true` | bool | Playback speed selector |
| `show_skip` | `true` | bool | Skip back 15s / forward 30s |
| `show_progress` | `true` | bool | Progress range and time display |
| `theme` | `default` | `default`, `dark`, `minimal` | Color theme |
| `style` | `card` | `card`, `compact`, `inline`, `minimal` | Layout style |
| `class` | — | string | Extra CSS classes on the wrapper |

Shortcode booleans accept `true`/`false`, `1`/`0`, `yes`/`no`, `on`/`off`.

## Premium episodes

For **premium** episodes in the **public** context, normalized episode data clears `canonical_audio`. The player shows the **Premium Episode Locked Message** from [Podcast Settings](podcast-settings.md) (when subscriptions are enabled) and does **not** output:

- `<audio src="...">`
- Download links
- `data-audio-url` or similar

This matches RSS and public page behavior; subscription entitlement on public WordPress pages is not upgraded by the player alone.

## Audio sources

Episode audio is resolved in this order (see episode **Audio source** meta):

1. **Upload** — Media Library file (CMB2 stores attachment ID in `{field}_id` meta)
2. **External URL** — Direct link to an audio file (must be playable MIME, not an embed-only page)

If neither is configured, visitors see *Audio is not available for this episode.* Administrators see a hint to configure upload or URL in the episode editor.

## Developer hooks

| Filter | Purpose |
| ------ | ------- |
| `mediablaster_audio_player_args` | Adjust render arguments before sanitize |
| `mediablaster_audio_player_episode` | Adjust normalized episode array |
| `mediablaster_audio_player_html` | Final playable player HTML |
| `mediablaster_audio_player_locked_html` | Locked state HTML |
| `mediablaster_audio_player_no_audio_html` | No-audio message HTML |

## Related docs

- [Shortcodes](shortcodes.md)
- [MediaBlaster Player](mediablaster-player.md) (video)
- [Podcasts overview](podcasts.md)
- [Podcast RSS](podcast-rss.md)
