DREAM 4K IPTV · FROM USD $8.99 / 1 MONTHInstall your player. Request a one-day trial
Worldwide viewing guides
Dream 4K · technical

Cross-origin media requests and CORS

Understand why a URL opening directly does not prove a web player may read it through JavaScript.

Cross-origin media requests and CORS — illustrated reference table
In this guideOrigin and request context matterEvery dependency needs the appropriate configurationCorrect the permitted server/application path

Cross-Origin Resource Sharing, or CORS, is a browser mechanism governing permitted access to cross-origin responses in relevant request contexts. A web player loading media through JavaScript can encounter origin rules that differ from direct navigation to the same URL.

CORS is not an account subscription or a codec feature. A resource can exist and be reachable while the browser refuses to expose its response to a particular web application.

Origin and request context matter

An origin includes scheme, host and port. A page at one origin reading resources from another can need appropriate server response permission. Some request characteristics introduce a preflight check. Credentialed requests have additional rules; a wildcard is not a universal substitute for an explicit permitted origin.

An original hypothetical web player is hosted at player.example and fetches a playlist from media.example. Opening the playlist in a browser tab tests navigation. It does not reproduce the JavaScript fetch context or prove that the response can be read by the player page.

Every dependency needs the appropriate configuration

A multiresource presentation can involve playlists, initialization data, audio, subtitles and media on different hosts. One resource having suitable headers does not establish that all dependencies do. A redirect can also change the destination or request context.

ObservationWhat it does not establish
URL opens in a tabJavaScript on another origin may read it
Entry playlist worksAll segments/subtitles have suitable origin handling
Native app worksBrowser origin policy is configured correctly
CORS error shownUnderlying media format is unsupported

Correct the permitted server/application path

Developers should configure intended origins, methods, headers and credentials according to current documentation. Viewers should report the exact browser console message and resource role through the player/source support route.

Do not disable browser security, install unknown bypass extensions or expose credentials to a public proxy. Those actions change the trust boundary and can leak private media access. The useful fix is an authorized correctly configured delivery path, supported by a minimal redacted request/response record.

READY FOR YOUR FIRST SCREEN?

Your device.
A clear next step.

Confirm the device and player first. Once the appropriate app is installed, request the one-day free trial.