Multimedia Showcase: Video, Podcasts & Embeds
A comprehensive test of multimedia embedding support — YouTube, Vimeo, podcasts, livestreams, HTML5 native media, and audio platforms.
This post tests how Amytis renders multimedia content embedded via raw HTML iframes and native HTML5 media elements. Since rehype-raw is enabled, standard HTML embed codes work directly inside Markdown.
YouTube Video
Responsive 16:9 YouTube embed using a padded wrapper:
"Me at the zoo" — the very first video uploaded to YouTube (April 23, 2005).
Vimeo Video
Vimeo also supports responsive 16:9 embedding:
Big Buck Bunny (2008) — open-source animated short by the Blender Foundation.
Podcast Embeds
Spotify Podcast
Spotify provides a fixed-height iframe embed for individual episodes:
You can also embed the full show player at a taller height (352px) to show the episode list:
Apple Podcasts
Apple Podcasts uses a similar iframe embed pattern:
Livestream Embeds
YouTube Live
A YouTube Live channel or active live video can be embedded exactly like a regular video. Use the channel's live URL (/live) or a live event ID:
<!-- Replace CHANNEL_ID with the YouTube channel ID -->
<iframe
src="https://www.youtube.com/embed/live_stream?channel=CHANNEL_ID"
...
></iframe>Below is NASA's public live stream:
Twitch Stream
Twitch requires your site's hostname in the parent query parameter (so the embed works in production):
<!-- Replace CHANNEL_NAME with a Twitch channel, and your-domain.com with your domain -->
<iframe
src="https://player.twitch.tv/?channel=CHANNEL_NAME&parent=your-domain.com"
height="378"
width="100%"
allow="fullscreen"
title="Twitch Stream"
></iframe>Twitch also supports embedding past broadcasts (VODs) and clips:
<!-- VOD -->
<iframe src="https://player.twitch.tv/?video=VOD_ID&parent=your-domain.com" ...></iframe>
<!-- Clip -->
<iframe src="https://clips.twitch.tv/embed?clip=CLIP_SLUG&parent=your-domain.com" ...></iframe>HTML5 Native Media
Native <video> and <audio> elements work without any third-party embeds.
HTML5 Video
<video controls style="width: 100%; border-radius: 12px; margin: 1rem 0; background: #000;" poster="https://peach.blender.org/wp-content/uploads/title_anouncement.jpg"
Elephants Dream (2006) — first open-source animated film by the Blender Foundation.
Attributes you can use:
| Attribute | Description |
|---|---|
controls | Show playback controls |
autoplay | Start playing automatically (use with muted) |
muted | Mute by default (required for autoplay) |
loop | Loop the video |
poster | Preview image shown before play |
preload | auto | metadata | none |
HTML5 Audio
<audio controls style="width: 100%; margin: 1rem 0;"
SoundHelix royalty-free sample track.
Multiple formats improve cross-browser support:
<audio controls>
<source src="audio.ogg" type="audio/ogg" />
<source src="audio.mp3" type="audio/mpeg" />
Your browser does not support the HTML5 audio element.
</audio>Audio Platforms
SoundCloud
SoundCloud exposes an iframe embed from any track's "Share → Embed" menu:
The full visual player (300px height) shows the waveform:
<iframe
width="100%"
height="300"
src="https://w.soundcloud.com/player/?url=TRACK_URL&visual=true"
...
></iframe>Bandcamp
Bandcamp provides both album and track embed codes:
<!-- Album embed -->
<iframe
style="border: 0; width: 100%; height: 120px;"
src="https://bandcamp.com/EmbeddedPlayer/album=ALBUM_ID/size=large/bgcol=ffffff/linkcol=0687f5/"
seamless
></iframe>Embed Best Practices
When embedding third-party media, keep these in mind:
- Responsive sizing: Wrap iframes in a
padding-bottom: 56.25%; position: relativecontainer to maintain 16:9 ratio. loading="lazy": Add this to below-the-fold embeds to defer loading and improve page speed.titleattribute: Always provide a descriptivetitlefor screen reader accessibility.- Privacy-enhanced mode: YouTube supports
youtube-nocookie.comto reduce tracking when embeds don't auto-play. allowoverallowfullscreen: Useallow="fullscreen"instead of the deprecatedallowfullscreenboolean attribute. Note that bareallow="fullscreen"restricts fullscreen to the iframe's own origin (more secure), whereas the legacyallowfullscreenwas equivalent toallow="fullscreen *"(any origin). For third-party embeds like YouTube or Vimeo,allow="fullscreen"is the correct and preferred form. When both attributes are present the browser warns thatallowtakes precedence.sandboxattribute: Use for untrusted embeds to restrict what the iframe can do.- Twitch
parentparameter: Twitch requires your site's hostname inparentfor embeds to work outside localhost.
<!-- YouTube privacy-enhanced embed -->
<iframe
src="https://www.youtube-nocookie.com/embed/VIDEO_ID?rel=0"
...
></iframe>Related Articles
Syntax Highlighting Showcase
A comprehensive test of syntax highlighting across various programming languages.
The Kitchen Sink: Comprehensive Feature Test
A complete showcase of all markdown features, code highlighting, diagrams, math, and layout capabilities supported by Amytis.
多语言测试并且要测试以下超长的标题看如何处理,如果太长的话要考虑方案: Amytis Digital Garden
这是一个用于测试多语言支持的文档,包含了中文、英文以及代码块。通过增加更多标题和内容,测试目录的滚动和链接功能。