Troubleshooting

How to Fix M3U8 CORS Errors

· Updated · LivePlayer · 10 min read
M3U8 CORS ErrorCORSHLSBrowser Debugging

Open LivePlayer, play the stream, then inspect failed playlist or segment requests in DevTools.

Reproduce the CORS error

CORS is a common reason M3U8 plays in VLC but fails in the browser. Reproduce it in LivePlayer, open DevTools, and check whether the playlist or segment responses are blocked for your page origin.

MDN explains that CORS is an HTTP-header based mechanism used by browsers to decide whether a resource from another origin can be loaded and shared. Their guide is here: Cross-Origin Resource Sharing (CORS).

What a CORS problem looks like

  • The player stays blank or keeps loading
  • The M3U8 request or segment requests fail in DevTools
  • The same link works in VLC but not in Chrome, Edge, or another browser

Why this happens with M3U8

An HLS stream is usually not just one file. The browser may request the main M3U8 playlist, variant playlists, media segments, and sometimes key files. If the server does not allow cross-origin access for one of those pieces, playback can fail.

What to check first

  1. Open the M3U8 link in LivePlayer.
  2. Open DevTools and go to Network.
  3. Play the stream again.
  4. Find the playlist request and any failed segment requests.
  5. Inspect the response headers.

Chrome documents the Network panel here: Network panel: Analyze network load and resources.

The response header people usually need

In many cases, the missing or wrong header is Access-Control-Allow-Origin. If the browser origin is not allowed, the response may still come from the server, but browser rules can block use of that response.

The exact fix depends on your server or CDN, but the pattern is the same: the origin making the browser request must be allowed for the playlist and the segments.

What often gets missed

Some teams only fix the top playlist and forget the segment files. Another miss: the problem may not be CORS alone. A signed URL may be expired, a segment may return 403 for permission reasons, or the page may also have an HTTPS problem.

Check for mixed content too

MDN explains mixed content here: Mixed content. If the website is on HTTPS and the media is on HTTP, the console may show errors that look similar at a quick glance.

A simple path forward

  1. Test the stream in the browser.
  2. Check the failed request in DevTools.
  3. Inspect the response headers.
  4. Verify whether Access-Control-Allow-Origin is present and correct.
  5. Repeat the check for segment files, not only the main playlist.

For the broader checklist, use M3U8 Not Playing? 8 Common Fixes. For the testing workflow, use How to Test HLS Streams in Your Browser.

Related tools and guides

FAQ

Why does M3U8 work in VLC but fail with a CORS error in Chrome?
Browsers enforce CORS for cross-origin media requests. Desktop players often do not. The stream can be valid and still be blocked in the browser.
Which CORS header usually matters for M3U8?
Access-Control-Allow-Origin is the most common one. Playlist, variant playlists, and media segments may all need correct CORS headers.
How do I confirm it is really a CORS problem?
Reproduce the failure in LivePlayer, open DevTools Console and Network, and look for cross-origin blocked requests on the playlist or segments.