mirror of
https://gitlab.com/vyla-entertainment/documentation.git
synced 2026-11-13 14:07:20 -05:00
rewrite
This commit is contained in:
@@ -41,7 +41,7 @@ GA_API_SECRET=
|
||||
| `GA_MEASUREMENT_ID` / `GA_API_SECRET` | No | Enables Google Analytics event reporting. Leave blank to disable. |
|
||||
| `PORT` | No | Port the server listens on. Defaults to `7860`. |
|
||||
| `WORKER_COUNT` | No | Number of cluster workers to fork. Defaults to `1` locally. |
|
||||
| `ENABLE_DEBUG_ROUTE` | No | Set to `true` to enable `/api/debug/:id`. Keep this `false` in production — it exposes upstream request/response headers and raw source output. |
|
||||
| `ENABLE_DEBUG_ROUTE` | No | Set to `true` to enable `/api/debug/:id`. Keep this `false` in production - it exposes upstream request/response headers and raw source output. |
|
||||
| `PROXY_STREAMS` | No | Set to `true` to route stream playback through your own server's `/api` proxy endpoint instead of direct URLs. |
|
||||
| `PROXY_URL` | No | An external proxy base URL to use instead of the built-in `/api` proxy. Only used if `PROXY_STREAMS` is enabled. |
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## Use this only when HTTP is the right boundary
|
||||
|
||||
Stream API packages Vyla SDK behind a small Node.js HTTP service. It is useful when a browser, mobile app, or another process needs progressive playback candidates over HTTP. It is not required to use Vyla, and it is not the primary integration for a Node.js application—use [Vyla SDK](/sdk) directly in that case.
|
||||
Stream API packages Vyla SDK behind a small Node.js HTTP service. It is useful when a browser, mobile app, or another process needs progressive playback candidates over HTTP. It is not required to use Vyla, and it is not the primary integration for a Node.js application-use [Vyla SDK](/sdk) directly in that case.
|
||||
|
||||
The service accepts TMDB IDs, asks configured SDK providers for candidates, verifies results, and emits usable sources as they arrive. A player can start with the first source while retaining later sources as fallbacks.
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
|
||||
`GET /health` (or `/api/health`) probes active providers and returns a JSON summary. It includes a status, timestamp, TMDB-key presence, cache size, and a map of provider keys to `{ ok, ms }` results.
|
||||
|
||||
Health is a signal, not a promise of playback. Provider behavior can differ by title, client network, and the moment of the request. Use it for observability and source selection—not as a guarantee that a viewer will receive a stream.
|
||||
Health is a signal, not a promise of playback. Provider behavior can differ by title, client network, and the moment of the request. Use it for observability and source selection-not as a guarantee that a viewer will receive a stream.
|
||||
|
||||
## Test one provider
|
||||
|
||||
`GET /test/:id?source=:providerKey` resolves a single provider for a movie. Add `season` and `episode` (or `s` and `e`) for TV.
|
||||
|
||||
```bash
|
||||
curl "http://localhost:7860/test/155?source=provider-key"
|
||||
curl "http://localhost:7860/test/1396?season=1&episode=1&source=provider-key"
|
||||
curl "YOUR_API_URL/test/155?source=provider-key"
|
||||
curl "YOUR_API_URL/test/1396?season=1&episode=1&source=provider-key"
|
||||
```
|
||||
|
||||
Use source keys reported by the running deployment. A test result reports whether resolution and verification succeeded; clients should inspect the result body rather than relying only on a transport success.
|
||||
|
||||
@@ -14,8 +14,8 @@ The API supports both the short paths below and `/api`-prefixed equivalents. A m
|
||||
`id` is a TMDB ID. For example:
|
||||
|
||||
```bash
|
||||
curl -N "http://localhost:7860/movie?id=155"
|
||||
curl -N "http://localhost:7860/tv?id=1396&season=1&episode=1"
|
||||
curl -N "YOUR_API_URL/movie?id=155"
|
||||
curl -N "YOUR_API_URL/tv?id=1396&season=1&episode=1"
|
||||
```
|
||||
|
||||
## Event contract
|
||||
@@ -44,7 +44,7 @@ One event for each candidate that passes the service's verification pipeline.
|
||||
"source": {
|
||||
"source": "provider-key",
|
||||
"label": "Provider name",
|
||||
"url": "http://localhost:7860/api?url=…"
|
||||
"url": "YOUR_API_URL/api?url=…"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user