This commit is contained in:
2026-11-15 17:34:41 -08:00
parent bc7c89b528
commit 46152a464d
37 changed files with 1413 additions and 3919 deletions

View File

@@ -4,7 +4,7 @@
## Progressive Playback Endpoints
Stream API uses Server-Sent Events (SSE) so players can start buffering as soon as the first candidate source is verified.
Stream API uses Server-Sent Events (SSE) so players can start buffering as soon as the first candidate source is verified. Both root paths (`/movie`, `/tv`) and prefixed paths (`/api/movie`, `/api/tv`) are supported.
---
@@ -20,6 +20,7 @@ Accept: text/event-stream
**Parameters:**
- `id` *(number, required)* — Numeric TMDB Movie ID (e.g. `155` for The Dark Knight).
- `sources` *(string, optional)* — Comma-separated list of source keys to query (e.g. `?sources=vidlink,vixsrc`). Omit to query all active sources.
---
@@ -37,6 +38,7 @@ Accept: text/event-stream
- `id` *(number, required)* — Numeric TMDB TV Series ID (e.g. `1396` for Breaking Bad).
- `season` *(number, required)* — Season number (e.g. `1`).
- `episode` *(number, required)* — Episode number (e.g. `1`).
- `sources` *(string, optional)* — Comma-separated list of source keys to query.
---
@@ -70,13 +72,13 @@ data: {
```
### Event 2..N: `source`
Emitted progressively as each provider scraper completes two-phase verification.
Emitted progressively as each provider scraper completes verification.
```json
data: {
"type": "source",
"source": "vidlink",
"label": "VidLink Primary",
"label": "VidLink",
"url": "https://api.vyla.cc/api?url=https%3A%2F%2Fupstream.cdn%2Fmaster.m3u8&vl=1",
"server": "vidlink-cf",
"quality": "1080p",
@@ -102,28 +104,27 @@ data: {
## Media Reverse Proxy: `GET /api`
The `/api` route handles media proxying, M3U8 playlist rewriting, header spoofing, and byte stripping.
The `/api` route handles media proxying, M3U8 playlist rewriting, header forwarding, and byte stripping.
```http
GET /api?url=https%3A%2F%2Fcdn.example.com%2Fvideo.m3u8&vl=1 HTTP/1.1
```
**Parameters:**
- `url` *(string, required)* — URL-encoded target URL to fetch.
- `proxyHeaders` *(string, optional)* — URL-encoded JSON object of custom headers to forward.
- `<source_flag>` *(string, optional)* — Source flag matching configuration (e.g. `&vl=1`, `&vx=1`) to apply source-specific referer rules.
- `tt` *(string, optional)* — Forces the 120-byte image header stripping routine on MPEG-TS video chunks.
- `url` or `proxy` *(string, required)* — URL-encoded target URL to fetch.
- `proxyHeaders` *(string, optional)* — URL-encoded JSON string of custom headers to forward.
- `tt` *(string, optional)* — Forces the 120-byte image header stripping routine on obfuscated video chunks.
**Proxy Features:**
- **M3U8 Rewriting**: Rewrites all `.ts` chunk URIs and `#EXT-X-KEY` AES encryption endpoints to route through the proxy with CORS headers (`Access-Control-Allow-Origin: *`).
- **Obfuscation Stripping**: Slices off the 120-byte image header if chunks start with PNG (`0x89`), JPEG (`0xFF`), or null (`0x00`) bytes.
- **Obfuscation Stripping**: Slices off the 120-byte fake image header if chunks begin with PNG (`0x89`), JPEG (`0xFF`), or null (`0x00`) bytes.
- **Range Seeking**: Forwards `Range: bytes=start-end` headers and returns HTTP `206 Partial Content` for video seeking.
---
## Active Sources Listing: `GET /api?sources_meta=1`
Returns all provider scrapers currently loaded into the instance:
Returns all provider scrapers currently loaded:
```json
{
@@ -137,6 +138,16 @@ Returns all provider scrapers currently loaded into the instance:
---
## TMDB Proxy Helpers
Stream API provides server-side cached TMDB proxy routes:
- **Movie Metadata**: `GET /api?tmdb_movie=1&id=155&append_to_response=credits,videos`
- **TV Series Metadata**: `GET /api?tmdb_tv=1&id=1396`
- **TV Season Metadata**: `GET /api?tmdb_season=1&id=1396&s=1`
---
## HTTP Status Codes
- `200 OK` — Request succeeded or SSE stream opened.