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
- Open the M3U8 link in LivePlayer.
- Open DevTools and go to Network.
- Play the stream again.
- Find the playlist request and any failed segment requests.
- 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
- Test the stream in the browser.
- Check the failed request in DevTools.
- Inspect the response headers.
- Verify whether
Access-Control-Allow-Originis present and correct. - 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.