Skip to main content
GET
/
api
/
player
GET /api/player
curl --request GET \
  --url https://vyla-api.pages.dev/api/player
Returns a self-contained HTML page with a fullscreen video player. All sources are fetched, proxied, and played automatically with HLS.js. If one source fails or stalls, the player falls back to the next source. Subtitles are injected automatically.

Query Parameters

id
string
required
TMDB movie or series ID.
type
string
default:"movie"
movie or tv
season
number
default:"1"
Season number — TV only.
episode
number
default:"1"
Episode number — TV only.
nocheck
string
Set to 1 to skip live HEAD checks and use all sources directly. Faster startup, but some dead sources may be tried before a working one is found.

Embed as an iframe

<iframe
  src="https://vyla-api.pages.dev/api/player?type=movie&id=550"
  width="100%"
  height="500"
  allowfullscreen
  frameborder="0"
></iframe>

How It Works

1

Scrape all providers

The player scrapes all 8 providers concurrently and collects every available source.
2

Live HEAD check

Each source is verified with a HEAD request (unless nocheck=1). Sources that respond successfully are loaded first; dead sources are skipped.
3

Fallback to full list

If all sources fail the check, the full unfiltered list is used as a fallback — so the player always has something to try.
4

Play with HLS.js

Sources are loaded in order — HLS.js for .m3u8 streams, native <video> for MP4. All URLs are routed through /api/proxy automatically.
5

Auto-advance on failure

An 8-second stall timer auto-advances to the next source if playback doesn’t begin. On error events, the next source is tried immediately.
6

Subtitle injection

Subtitles are attached as <track> elements with the first track set as default — no configuration needed.

Player Events & Behavior

EventAction
playingClears the stall timer — source is working
errorImmediately tries the next source
stalledStarts the 8-second stall timer if playback hasn’t begun
waitingStarts the 8-second stall timer if playback hasn’t begun
HLS fatal errorDestroys the HLS instance and tries the next source

Response

The endpoint returns a full HTML document, not JSON. It should be embedded via <iframe> or opened directly in a browser. On error, an HTML error page is returned:
A self-contained HTML page with the embedded video player. Intended for iframe embedding.
The player uses HLS.js v1.5.13. On Safari, native HLS is used instead when HLS.js is not supported.