Skip to content

Apple Music Embed#

View Markdown

Apple Music embeds are opt-in and render to Apple's official iframe player.

import { oxContent } from "@ox-content/vite-plugin";

export default {
  plugins: [
    oxContent({
      embeds: {
        appleMusic: true,
      },
    }),
  ],
};
<AppleMusic
  url="https://music.apple.com/us/album/ummg-feat-taylor-eigsti/1769360313?i=1769360314"
></AppleMusic>

Supported share hosts are music.apple.com and already-embedded embed.music.apple.com URLs. The transform rewrites the share origin to https://embed.music.apple.com and keeps the storefront/path plus the i= song-selection query.

The iframe is lazy-loaded, titled, and uses Apple's recommended allow, sandbox, and referrerpolicy. It is a third-party player, so it stays disabled until you opt in. Pages that set a Content-Security-Policy need frame-src https://embed.music.apple.com (or the equivalent child-src).

Last updated: