Wavecast Radio

Source Adapters

The source parameter controls how the player resolves its audio URL. When omitted, the source type is auto-detected from the src URL.

Local (default)

Plays the URL as-is. Use for direct audio file links or local Hugo resources.

{{<podcast-playersrc="https://example.com/audio.mp3">}}

AzuraCast

Fetches the AzuraCast nowplaying API to discover the stream URL and enriches the player with current song metadata.

Requires the data-azuracast-api-url attribute:

{>{}<ssd}roapcuto=rad"c-c"eaa=zs"utar-zapuclraaasyctea-rsatp"i-url="https://radio.example.org/api/live/nowplaying/station-slug"

If src is provided alongside source="azuracast", it’s used directly without fetching the API.

Auto-detection: triggered when the URL contains azuracast or .stream..

iVoox

Fetches the iVoox episode page and extracts the audio URL from:

  1. og:audio meta property
  2. data-audio-url attribute
  3. <audio><source> element

On fetch failure, falls back to the src URL as-is.

{>{}<ss}ropcuo=rd"ccheat=st"tpi-svp:laxyw"ewrw.ivoox.com/episode-title_12345_1.html"

Auto-detection: triggered when the URL contains ivoox.com.

JavaScript Events API

The component emits custom events that bubble through the DOM. Listen on any <podcast-player> or <podcast-footer> element:

doc.}ua)mdc;ednEntvs{.eoqnlputeaeL.urilsysoeStgdee(,lneee.scrdrt(eco"t,rpa(lic"alupy)roe;rdrec-naststTtai-tmpeel",a,yde(urer")a)t=i>on{}

Event Reference

EventFired onDetail payload
player-stateplay, pause, seek{ paused, src, currentTime, duration }
podcast-playplay (compat){ src, title, url }
podcast-pausepause{ src }
podcast-closefooter close button{ src }
podcast-seekseek on any player{ src, currentTime }

sessionStorage Persistence

State is saved per-source in sessionStorage using the key format:

podcastPlayerState:<src>

This means multiple players on the same page use separate keys and don’t interfere with each other.

Cross-Page Behaviour

  • Navigating away pauses inline audio (saves position)
  • Returning to a page does not autoplay: the player restores in paused state
  • The footer player persists across all pages without interruption

Keyboard Shortcuts

KeyAction
SpaceToggle play/pause
Left ArrowSkip back 15 seconds
Right ArrowSkip forward 15 seconds
MToggle mute

Works on both inline and footer players when the player is focused.

Media Session API

Wavecast integrates with the Media Session API, which means:

  • Play/pause controls appear on OS lock screens and notification centres
  • Track title and cover art are displayed in system media controls
  • Hardware media keys (headphones, keyboard) control playback

This is automatic: no configuration needed.

Troubleshooting