HLS or DASH stream not playing in the browser? How to fix each cause

On this page 13 sections

Short answer: when an HLS (.m3u8) or DASH (.mpd) stream won’t play on a web page, one of the files the player downloads is being refused. Most of the time it’s a CORS header missing on the segments, an http:// address on an https page, an expired token, or a codec the browser can’t decode. To find out which, paste your stream address into our free HLS & DASH Stream Tester: it checks every kind of request and names the one that fails, with the fix.

Below, each cause in the order it usually shows up, and why the same stream can play in one browser and not in another.

Why a stream plays in VLC or Safari but not on your website

There are two ways a browser can play a stream, and they don’t follow the same rules:

  • Native playback: the browser downloads and plays the stream itself, like an MP4 file. Safari has always done this for HLS, and Chrome does it since version 142 (late 2025). Native playback doesn’t need CORS headers.
  • A JavaScript player such as hls.js or dash.js downloads each file with JavaScript and hands it to the browser through Media Source Extensions (opens in a new tab). Firefox needs one for HLS, and every browser needs one for DASH. Files downloaded this way follow the browser’s security rules, so every file must send CORS headers. The hls.js documentation says it plainly: “All HLS resources must be delivered with CORS headers permitting GET requests.”

Apps such as VLC aren’t browsers: they don’t apply any of these rules. That’s why “it works in VLC” doesn’t tell you much about your website.

BrowserHLS (.m3u8)DASH (.mpd)
Safari on Mac, iPhone and iPadNativeJavaScript player. On iPhone, only since iOS 17.1
Chrome (computer and Android)Native since Chrome 142; JavaScript player beforeJavaScript player
EdgeJavaScript player (native support not confirmed)JavaScript player
FirefoxJavaScript playerJavaScript player

Sources: caniuse: HLS (opens in a new tab), caniuse: DASH (opens in a new tab), MDN: ManagedMediaSource (opens in a new tab) (the version of Media Source Extensions iPhones got in iOS 17.1).

So a stream without CORS headers can play in Safari and in today’s Chrome, then fail in Firefox, in an older Chrome, or in any DASH player. Players that bring their own JavaScript engine, such as Fluid Player, use native HLS when the browser offers it and load hls.js or dash.js when it doesn’t. The Stream Tester always uses the JavaScript path, the strictest one: if your stream passes there, it plays in every browser.

Find the request that fails

A stream is not one file but many: a master playlist, one playlist per quality level (and per audio track), sometimes an encryption key, an initialization segment, then the media segments. The playlist often loads fine and the player fails a few files later.

You can find the failing file in your browser’s developer tools: open the Network tab, reload the page, and look for the first red line. The Console tab gives the reason, such as “blocked by CORS policy”.

Or paste the address into the Stream Tester. It downloads one file of each kind and tells you, in plain words, which one fails and on which server:

The Fluid Player Stream Tester on a stream whose segments are blocked: it explains that the server answered without an Access-Control-Allow-Origin header

Cause 1: CORS headers missing on some of the files

This is the most common cause, and it’s often only half fixed: the playlist sends the Access-Control-Allow-Origin header, but the segments or the key don’t. The player then loads the playlist, starts, and stalls. Here, the tester shows exactly that:

The Requests list of the Stream Tester: master playlist allowed, media playlist allowed, segment blocked by CORS

What to check:

  • Every file needs the header: playlists, segments, init segments and keys. A rule that only covers .m3u8 isn’t enough.
  • Every server needs it too. If the playlist comes from your origin and the segments from a CDN, or the other way around, both must send the header. The tester shows the host of each request.
  • Allow GET and HEAD, and the Range header, which players use to download parts of a file. On Amazon S3, a CORS rule without HEAD is a frequent mistake.
  • Watch the CDN cache. If a CDN stores a copy of a file without the header (a request made without an Origin, for example), it may serve that copy to everyone until it expires. The fix: make the CDN vary its cache on the Origin header (Vary: Origin), or always send the header, then purge the cache. A stream that fails only sometimes is a strong sign of this.

The tester’s page has ready-to-paste settings for nginx, Apache, Amazon S3, CloudFront and Cloudflare: see Fix CORS on your server.

Cause 2: http:// addresses on an https page

Browsers treat http:// files on an https:// page as mixed content (opens in a new tab). For a plain <video> element they try the https:// version instead, but the requests a JavaScript player makes are simply blocked. So an http stream may play natively in one browser and fail in all the others.

Look inside the playlists too: a stream can have an https:// master playlist that points to http:// quality levels, segments or keys (the URI of an EXT-X-KEY line is easy to miss). Every address must be https://. Most CDNs and streaming servers offer it at no extra cost.

Cause 3: 401, 403 and 404 errors

These come from the server, not from the browser:

  • 403 Forbidden usually means a token or a signed URL has expired, or the server only answers some sites. Short-lived tokens can expire between the moment you copy the address and the moment you test it, or during a long live session. If your server checks which page the request comes from (hotlink protection), it may also refuse tools and other sites: the Stream Tester sends no referrer, on purpose.
  • 401 means the stream needs a login. Web players don’t send your cookies to other sites, so streams protected by a login session don’t play on another site.
  • 404 Not Found on a segment, in a live stream, often means the player asked for a segment that’s no longer there: the playlist was served from a stale cache, or the player fell too far behind. On demand, it’s usually a wrong path in the playlist.

One more trap: some servers send their 403 or 404 error page without CORS headers, so the browser reports a CORS error instead of the real one. The tester checks both and says when it may be one or the other.

Cause 4: a codec the browser can’t play

The playlist and segments download fine, but the picture stays black or the player reports a media error. The browser can’t decode the video codec:

  • HEVC (H.265) plays in Safari, and in Chrome since version 107 only on computers with hardware support on Windows and Linux. Firefox supports it from version 134, depending on the system (MDN: video codecs (opens in a new tab)).
  • AV1 plays in Chrome, Edge and Firefox, but in Safari only with a hardware decoder: M3 Macs and later, iPhone 15 Pro, iPhone 16 and later.
  • H.264 (AVC) plays everywhere.

The fix: always include at least one H.264 quality level. And declare the codecs in the master playlist: Apple’s HLS Authoring Specification (opens in a new tab) says each EXT-X-STREAM-INF tag “MUST always provide the CODECS attribute”, so players can skip the levels they can’t play. The tester lists the codecs of each level and marks those your browser doesn’t support.

Cause 5: live streams

Live streams have problems of their own:

  • The encoder isn’t sending: the playlist exists but stops growing. Check that the encoder is live right now.
  • Too few segments in the playlist. Apple’s specification asks for at least six segments in a live playlist, of about six seconds each. With only two or three, players stall on the slightest network hiccup.
  • A cached playlist. A live playlist changes every few seconds. If your CDN keeps it for minutes, players see an old list and ask for segments that are gone. Cache live playlists for no longer than about half a segment’s duration; the segments themselves can be cached for a long time.
  • DASH without a time source. A live DASH manifest should include a UTCTiming element, so players can sync their clock with the server. Without it, a viewer whose computer clock is off may request segments that don’t exist yet.

Cause 6: DRM-protected streams

Streams protected with Widevine, PlayReady or FairPlay need a license server and an agreement with the stream’s owner. A plain web player, or a tester, can read their playlists but can’t play them. If the stream is yours, test it with your DRM provider’s player settings. AES-128 encryption (an EXT-X-KEY with METHOD=AES-128) isn’t DRM: those streams play in any player, as long as the key also sends CORS headers.

Cause 7: the player is set up wrong

Sometimes the stream is fine and the page isn’t:

  • The wrong type on the <source> element. Players use it to decide how to load the stream. Writing type="video/mp4" for an .m3u8 file sends it down the wrong path. With Fluid Player, use application/x-mpegURL for HLS and application/dash+xml for DASH.
  • An outdated player or plugin. Old HLS plugins have long been replaced; keep your player up to date.

Here is a Fluid Player setup that plays HLS everywhere: natively in Safari and Chrome, with hls.js in Firefox. For DASH, change the address and the type.

HTML
<video id="my-stream" controls>
  <source src="https://example.com/live/stream.m3u8" type="application/x-mpegURL">
</video>

<script src="https://cdn.fluidplayer.com/v3/current/fluidplayer.min.js"></script>
<script>
  fluidPlayer('my-stream');
</script>

When your stream plays in the tester, the code under it is already filled in with your address. The HLS (opens in a new tab) and DASH (opens in a new tab) pages of the Fluid Player documentation list the streaming options.

HLS vs DASH in one minute

Both cut a video into short segments, list them in a text file and let the player switch between quality levels as the connection changes:

  • HLS (HTTP Live Streaming) was created by Apple. Its playlists are .m3u8 text files. It’s described in RFC 8216 (opens in a new tab) (2017); the newer features, Low-Latency HLS included, are in its revision draft (opens in a new tab).
  • DASH (Dynamic Adaptive Streaming over HTTP) is an international standard, ISO/IEC 23009-1. Its manifests are .mpd XML files.
  • CMAF (ISO/IEC 23000-19) defines fragmented MP4 segments that HLS and DASH can both use, so one set of files can serve both formats when the encryption allows it.

In Bitmovin’s 2026/27 Video Developer Report (opens in a new tab), 78% of the developers surveyed use HLS in production and 66% use DASH (many use both). For a website, HLS is the simpler choice: it plays natively in Safari and Chrome, and with a JavaScript player everywhere else.

Checklist before you embed a stream

  1. Every file sends Access-Control-Allow-Origin: playlists, segments, init segments and keys, on every server.
  2. Every address is https://, including those inside the playlists.
  3. Tokens last longer than a viewing session.
  4. There’s at least one H.264 quality level, and CODECS is declared for each one.
  5. Live: at least six segments in the playlist, and the CDN doesn’t cache it for long.
  6. The <source> type is application/x-mpegURL (HLS) or application/dash+xml (DASH).
  7. The stream passes the Stream Tester, which uses the strictest path.

FAQ

Does Chrome support HLS natively?

Yes, since Chrome 142, released in late 2025, on computers and Android. Before that, Chrome needed a JavaScript player such as hls.js. Firefox still does. DASH isn’t played natively by any browser.

Do the segments need CORS headers too?

Yes. A JavaScript player downloads every file of the stream, so the playlists, the segments, the initialization segments and the keys all need the Access-Control-Allow-Origin header. The most common half-fix covers the playlists only.

Why does my stream fail only sometimes?

Usually a CDN serving a cached copy without CORS headers to some visitors. Make the CDN vary its cache on the Origin header, or always send the CORS header, then purge the cache. For live streams, a playlist cached too long gives the same kind of random failures.

What does manifestLoadError mean in hls.js?

hls.js couldn’t download the playlist. The cause can be CORS, a 403 or 404, an http address on an https page, or a network problem: hls.js reports them all the same way. Test the address in the Stream Tester to see which one it is.

Can Chrome play HEVC (H.265) streams?

Since Chrome 107, on Macs (macOS Big Sur and later) and Android, and on Windows and Linux computers with hardware HEVC support. Not every viewer has it, so keep an H.264 quality level in your stream.

Does DASH work on iPhone?

Only with a JavaScript player, and only on iOS 17.1 and later, which added the Media Source Extensions DASH players need. Safari doesn’t play DASH by itself. For iPhone viewers, HLS is the safe choice.

Which MIME type should my server send for .m3u8 and .mpd files?

application/vnd.apple.mpegurl for .m3u8 playlists (RFC 8216 (opens in a new tab)) and application/dash+xml for .mpd manifests. That’s the server side; on the page, Fluid Player’s <source> type for HLS is application/x-mpegURL.

Test your stream

Paste your address into the HLS & DASH Stream Tester. It’s free, needs no account, and runs in your browser: your stream address is only sent to the stream’s own server. Once the stream passes, copy the code under the player to put it on your site with Fluid Player.

What else it checks, and why we built it: see our launch post.