How to Generate M3U8 Embed Code (iframe and embed link)

Like M3u8Player.app? Please share!

If you have an M3U8 (HLS) URL and want it on your site, blog, or docs—without spinning up a backend or building a player from scratch—you’re not alone.

It’s straightforward: open the M3U8 embed code generator in your browser, paste the stream URL, choose whether to try autoplay, and you get two things: a shareable embed page link and iframe HTML you can drop into any page.

This walkthrough goes in order: if you don’t have an M3U8 link yet, section two explains where URLs usually come from and links to a dedicated how-to; from section three it’s “paste into the generator, copy code”; finally we cover video_url, autoplay, and other query parameters.

New to .m3u8? Start here: What is an M3U8 file.

1. Who this is for

Marketers dropping a live clip on a campaign page; developers who need a correct iframe for staging—same idea: embed an HLS stream in a webpage. The generator only accepts M3U8 (HLS) for now; the embed page URL and iframe point at the same player—pick whichever fits your workflow.

2. No M3U8 address yet? Get the URL first

Many people get stuck here: the video plays on the page, but you don’t know what to put for the .m3u8. The embed tool needs one directly reachable M3U8 playlist URL, so you have to surface it from the page or network traffic.

A common, low-friction option is the free Chrome extension The Stream Detector: on a page where the video actually plays, open the extension and it surfaces HLS URLs; pick one and copy. Rough flow: install from the Chrome Web Store → pin the extension → go back to the video page (refresh if needed) → follow the badge / list → copy the URL you want.

Step-by-step install links, screenshots, double-click copy are in this guide:

👉 Best way to find an M3U8 address

If you prefer DevTools, use Network and filter for m3u8 or manifest, find the master playlist, and copy the URL—it’s a bit steeper, same goal: you want the final https URL of the playlist.

After you have a URL, test it in our M3U8 online player to confirm playback and that you’re allowed to embed it before generating the embed.

3. What you need before you start

  1. A working M3U8 URL (prefer https://, and you have rights to play it on your site). If you’re still unsure, see the previous section and Best way to find an M3U8 address.
  2. Whether the embed page should try to autoplay on load—when the toggle is on, the link includes that parameter; whether autoplay actually works still depends on the browser (more below).

No stream of your own yet? Try this public test stream:
https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8

4. Three steps

Step 1: Open the page and paste the URL

Paste the M3U8 URL in the generator

  1. Open the M3U8 embed code generator
  2. Paste your playlist into M3U8 (HLS) URL.
  3. Embed format is M3U8 (HLS) for now; if more formats are added later, choose here.

Step 2: Autoplay or not

Turn on Try autoplay on the embed page and the generated link will include autoplay=true. The player will try to start automatically; autoplay with sound is often blocked—muted or click-to-play is usually safer.

Step 3: Copy what you need

Copy embed link and iframe code

You’ll see two blocks:

  • Embed page URL: good for chat, email, docs, or “insert link” in a CMS.
  • iframe HTML: good when you control the template and want the player inline.

Not sure? Use Open preview first, confirm the picture looks right, then copy to production.

5. Query parameters (quick reference)

The generator writes your choices into the query string. The main playback-related ones:

ParameterMeaningNotes
video_urlYour stream URLURL-encoded so & and ? in the stream don’t break the link.
autoplayTry autoplay or nottrue means “try”; the browser still has the final say.

Rough shape (use what your page actually outputs):

https://m3u8player.app/en/embed/m3u8/?video_url=…&autoplay=true

With autoplay off, autoplay=true usually isn’t included.

6. Common pitfalls

  • Rights: being able to play it doesn’t mean you can embed it publicly—check licensing.
  • Reachability: if the origin blocks cross-origin access or the stream is internal-only, visitors won’t play it either; if your page is HTTPS, prefer HTTPS streams.
  • Autoplay: the parameter doesn’t guarantee autoplay—test preview and real devices.
  • Format: this flow is M3U8 (HLS) only; plain MP4 direct links aren’t covered here.

7. How this fits with other pages on the site

Just play in the browser and switch quality: M3U8 online player.
Download segments: M3U8 online downloader—use legally.
The embed generator helps you build the link and iframe for any page.
Still missing the M3U8 URL? Read Best way to find an M3U8 address first, then come back here.

Wrap-up

In one line: don’t know how to find the URL → read Best way to find an M3U8 address, use The Stream Detector or the Network panel; then open the embed generator → paste M3U8 → choose autoplay → copy URL or iframe. video_url and optional autoplay=true are assembled for you—no hand-rolling. Try the test stream first, then swap in your own URL.