There are two ways to do it. Pick one:
If your product already supports oEmbed discovery, or embeds through Iframely or Embedly, tday.com links
may already work: every tday.com video page names its oEmbed endpoint (Discovery).
Match the link
A tday.com video link looks like one of these:abcdefghjkmnpqrstuvwxyz23456789 (lowercase letters and digits,
without the look-alikes 0 o 1 l i). Match it, then frame the player at https://tday.com/e/<id>:
JavaScript
- Keep
?c=. It names a chapter of the video, so a link someone posted at a particular step opens at that step. - Size by width. The player is 16:9. Set its width and
aspect-ratio: 16 / 9, and leave outheight, which would cancel the ratio. - Allow fullscreen. Keep
allow="autoplay; fullscreen; picture-in-picture"andallowfullscreenso the player’s fullscreen button works. - Our other pages are not videos. Almost none of them fit the pattern, since the id must be
exactly 8 characters of the alphabet above, at the root or under
/e/. The one that does is left out above. A link that fits but names no video shows “no longer available” in the frame. If you would rather never guess, ask oEmbed: it answers only for real videos.
Ask oEmbed
tday.com answers oEmbed for every public video. Call it from your server when a link is posted:Response
- Status codes.
200with the JSON above;404for a link that is not a tday.com video, a private video, or one that has been removed. A404for a real video link is not cached, since a video that is still rendering answers a few minutes later. - Caching. Keep an answer for up to
cache_ageseconds. You do not need to refresh it when the video is re-recorded: the player always plays the newest take. - Open to everyone. No key, and CORS allows every origin.
thumbnail_url and title from the same
answer.
Discovery
Every tday.com video page carries the standard tags, so a generic unfurler finds the player on its own:What the player does
- Plays the newest take. A link points at the video, not one version of it. When the team behind it records it again, every post that embeds it plays the new take, with no change on your side.
- Stays inside its frame. The player is the video alone, edge to edge, with no tday.com page around it. Any link in it opens in a new tab.
- Sets no cookies and loads no analytics. It runs inside other people’s pages, so it counts views without tracking the viewer.
- Says when it cannot play. A private video shows “This video is private.” and a removed one shows that it is no longer available, inside the frame, so a stale post never breaks your layout.
Content Security Policy
If your site sets a Content Security Policy, allow the player in frames:img-src https://cdn.tday.com.