Home / Knowledge / Advanced

Why It Won't Play in Your Browser: CORS Explained

Many people paste an M3U8 into a web player and see "load failed" or "source not supported". The usual culprit is CORS (Cross-Origin Resource Sharing).

Why browsers police cross-origin requests

For security, browsers stop a page from reading resources on other domains by default. When your player lives on domain A and the M3U8 segments on domain B, B must explicitly allow A in its response headers — typically via Access-Control-Allow-Origin.

Why desktop players are fine

Native apps like VLC and mpv aren't bound by the browser's same-origin policy and can fetch any network address. That's why "VLC plays it, the web page doesn't" is such a common pattern.

Practical options

  • Prefer streams whose source already allows CORS;
  • If you control the source server, configure proper CORS response headers;
  • Relay requests through a server-side proxy (mind compliance and performance);
  • Or simply use a desktop player.
Our web player is subject to CORS too — that's a browser safety mechanism, not a bug in the tool. If a stream won't open, use VLC first to check whether the source itself is valid.
← HLS Live: Why the Playlist Keeps SlidingOpen M3U8 with VLC: A Step-by-Step Guide →