Skip to content
MawCastDocs
Return to home

Embed the player

One line of HTML, and what each part of it is doing.

Last updated September 20261 min read

Control builds the snippet for you with your station's address already in it. It is an iframe, so it carries its own styles and cannot be broken by the page around it.

html
<iframe
  src="https://myradio.mawcast.com/embed"
  width="100%"
  height="440"
  frameborder="0"
  allow="autoplay"
  title="Listen to My Radio"
></iframe>

The parts

AttributeWhy it is there
srcYour station's embed address.
widthFull width of wherever you paste it. Change it if you want it narrower.
heightMust match the size you chose in Control: 440 for card, 460 for hero. Control writes it into the snippet for you.
allowLets the player start audio. Without it, browsers refuse.
titleWhat a screen reader announces the frame as. Do not remove it.
Browsers will not start audio on their own

allow="autoplay" permits playback; it does not force it. Every modern browser still requires the listener to press play first, wherever the player is embedded.

Changing the height later

The height in the snippet and the size in Control have to agree. Change it in Control, copy the snippet again, and replace the old one.

Was this page helpful?

Still need help? Write to contact@mawcast.com.