Embed the player without rebuilding it

Embeddable widget

Use the widget to play a full album, a single track, all songs, or a custom playlist. The embed stays simple: one iframe, a small set of URL flags, and variants sized for the page you are building.

Single iframe Clipboard and web-share allowed Compact is the safe default

Keep the iframe width at 100 percent and choose the height that matches the widget variant. Autoplay is off by default and still subject to browser policy even when requested.

LoftwahFM embeddable widget
Best fit pages that need a working player fast without pulling the whole site UI into another codebase

Supported examples

Start with the variant that matches the amount of space you have. Compact is the safest choice for most marketing pages. Use the full variant only when the player is the main feature of the section.

Full library

Best when the embed is the main listening surface on the page.

                  <iframe src="https://fm.loftwah.com/widget?album=all&variant=default" width="100%" height="420" frameborder="0" title="LoftwahFM widget example: full library player" allow="clipboard-write; web-share"></iframe>
                

Compact

Best for landing pages, blog posts, and smaller content blocks.

                  <iframe src="https://fm.loftwah.com/widget?album=all&variant=compact" width="100%" height="240" frameborder="0" title="LoftwahFM widget example: compact library player" allow="clipboard-write; web-share" loading="lazy"></iframe>
                

Compact with a preselected track

Best when you want to feature one song but keep shuffle and repeat ready.

                  <iframe src="https://fm.loftwah.com/widget?album=run-it&file=Run%20it.mp3&variant=compact&shuffle=1&repeat=all&width=560" width="100%" height="240" frameborder="0" title="LoftwahFM widget example: compact preselected track" allow="clipboard-write; web-share" loading="lazy"></iframe>
                

Mini

Best when the player needs to sit inside a tighter layout or sidebar.

                  <iframe src="https://fm.loftwah.com/widget?album=all&variant=mini" width="100%" height="120" frameborder="0" title="LoftwahFM widget example: mini player" allow="clipboard-write; web-share" loading="lazy"></iframe>
                

How to embed it

Put the iframe inside a full-width row, keep the iframe itself at 100 percent width, and let the widget handle the internal max width with the width flag if you need to constrain it.

HTML
<section class="embed-row">
  <iframe
    src="https://fm.loftwah.com/widget?album=run-it&file=Run%20it.mp3&variant=compact&shuffle=1&repeat=all&width=560"
    width="100%"
    height="240"
    frameborder="0"
    loading="lazy"
    title="LoftwahFM widget example: compact preselected track"
    allow="clipboard-write; web-share">
  </iframe>
</section>
React / Next.js
<section style={{ width: "100%" }}>
  <iframe
    src="https://fm.loftwah.com/widget?album=run-it&file=Run%20it.mp3&variant=compact&shuffle=1&repeat=all&width=560"
    style={{ width: "100%", height: 240, border: 0, display: "block" }}
    loading="lazy"
    title="LoftwahFM widget example: compact preselected track"
    allow="clipboard-write; web-share"
  />
</section>

URL flags

Use only the flags you need. The widget already has sensible defaults for most embeds.

Content

  • album

    Album slug, or all or playlist.

  • file

    Track filename within the album, URL encoded.

  • tracks

    Comma-separated slug/File.mp3 list for a custom playlist.

Playback

  • shuffle

    Use 1 or true to enable shuffle on load.

  • repeat

    Use none, one, or all. Defaults to the previous player preference.

  • autoplay

    Off by default. Browsers may still block it even if you request it.

Presentation

  • variant

    Compact is the stable default. Other variants are more experimental.

  • brand

    Set to 0 or false to hide the LoftwahFM brand header.

  • unstyled

    Set to 1 or true to avoid site global styles and keep Tailwind utilities only.

  • width / w

    Maximum content width in pixels inside the iframe. Defaults vary by variant.

Browser autoplay policies still require a user gesture in many cases, so treat autoplay as a request rather than a guarantee.