Embeds

Embeds let you place external content onto your page, such as YouTube or Vimeo videos.

Important: Always attach an aspectRatio() modifier to embeds, so they scale correctly.

For example, here's a YouTube video:

Embed(youTubeID: "dQw4w9WgXcQ", title: "There was only ever going to be one video used here.")
    .aspectRatio(.r16x9)

Here's a Vimeo video:

Embed(vimeoID: 291590798, title: "Teaching Swift at Scale – Paul Hudson at NSSpain.")
    .aspectRatio(.r16x9)

And here's a very important embedded website:

Embed(title: "Upgrade your Mac at Apple.com", url: URL("https://www.zombo.com"))
    .aspectRatio(.r16x9)

Created with Ignite