Developers

Embed Cassetta

Put any public Cassetta post on your site, blog, or newsletter as a player people can press play on.

The player

Paste a link

On platforms that support oEmbed (WordPress, Ghost, Notion, and many others), paste a post link on its own line and it turns into the player:

https://www.cassetta.fm/post/Wke7fkETj4hN5MVfDdik

Copy the embed code

On cassetta.fm, open a post, click Share, then Embed. Pick a size, copy the code, and paste it anywhere that accepts HTML:

<iframe src="https://www.cassetta.fm/embed/post/Wke7fkETj4hN5MVfDdik" width="100%" height="168" style="border:0;border-radius:16px;max-width:640px" loading="lazy" allow="autoplay" title="O. Henry: Winter is Coming on Cassetta"></iframe>

In Notion, type /embed and paste the player address on its own: https://www.cassetta.fm/embed/post/<id>.

Sizes

The player lays itself out from the iframe's height. Width is fluid up to 640px.

Compact 96px
Cover, title, and play controls in one slim row.
Standard 168px
Adds the creator, length, and a "Listen on Cassetta" link. The default.
Large 650px
A full-width cover with the controls below, like the post page.

Mini player

Turn on "Shrink to a mini player while scrolling" in the embed options and the code also loads a small script. When readers scroll past the player while it's playing, it docks as a compact bar at the bottom (or top) of the screen, and they can close it. Where scripts aren't allowed, the player stays pinned to the top at full size instead.

oEmbed API

Cassetta is an oEmbed provider. Post pages advertise the endpoint with a <link rel="alternate" type="application/json+oembed"> tag, so discovery works too.

Endpoint
https://www.cassetta.fm/api/oembed
URL schemes
https://www.cassetta.fm/post/*
https://cassetta.fm/post/*
url
Required. A Cassetta post link, https://www.cassetta.fm/post/<id>.
format
Optional. Only json is supported; anything else returns 501.
maxwidth
Optional. The returned width is never wider than this, and at most 640.
maxheight
Optional. Below 168, you get the compact player (96px tall).

Example request:

https://www.cassetta.fm/api/oembed?url=https%3A%2F%2Fwww.cassetta.fm%2Fpost%2FWke7fkETj4hN5MVfDdik

Response:

{
  "version": "1.0",
  "type": "rich",
  "provider_name": "Cassetta",
  "provider_url": "https://www.cassetta.fm",
  "title": "…",
  "author_name": "…",
  "author_url": "https://www.cassetta.fm/station/<username>",
  "thumbnail_url": "…",
  "html": "<iframe src=\"https://www.cassetta.fm/embed/post/<id>\" …></iframe>",
  "width": 640,
  "height": 168,
  "cache_age": 3600
}

Unknown or removed posts return 404. Responses allow any origin (CORS) and are cached for a few minutes.

Guidelines

  • Embed the player as provided: don't hide the title, creator, or links back to Cassetta.
  • If a post is removed, its embed stops playing.
  • Use of embeds is covered by our Terms and Privacy Policy.

Contact

Building an integration or need something the player doesn't do? Email hello@cassetta.fm.

Back to home