Skip to content

Commit 49bba21

Browse files
committed
chore: Update specific proxy features to reference editor UI options
1 parent 399ec5d commit 49bba21

File tree

4 files changed

+194
-116
lines changed

4 files changed

+194
-116
lines changed

docs/proxy/failover.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,40 @@ When [Sticky Sessions](./sticky-sessions.md) are enabled, the proxy locks to a s
141141
3. If the original URL also fails, trigger failover to the next failover URL
142142
4. The sticky session locks to the new provider's backend
143143

144+
## Advanced Failover (M3U Editor)
145+
146+
The M3U Editor adds a higher-level **failover resolver** on top of the proxy's built-in URL cycling. When enabled, the proxy calls back to the editor to determine which playlist to use next, taking into account playlist stream limits and health state.
147+
148+
Configure this under **Settings → Preferences → Proxy** in the editor.
149+
150+
### Failover Resolver
151+
152+
| Setting | Description |
153+
|---------|-------------|
154+
| **Enable advanced failover logic** | Proxy calls the editor to resolve the next failover source based on playlist capacity |
155+
| **Resolver URL** | The URL the proxy uses to reach the editor (e.g. `http://m3u-editor:36400`). Must be reachable from the proxy container |
156+
157+
When enabled, the proxy sends a request to the editor's resolver endpoint during failover, and the editor returns the best available backup source — respecting stream limits, marked-invalid playlists, and provider health.
158+
159+
### Fail Conditions
160+
161+
| Setting | Description |
162+
|---------|-------------|
163+
| **Enable playlist fail conditions** | Mark playlists as temporarily unavailable when specific HTTP errors are returned by the provider |
164+
| **HTTP status codes** | Codes that trigger an invalid state (e.g. `403`, `404`, `502`, `503`) |
165+
| **Invalid timeout (minutes)** | How long a playlist stays invalid before being retried. Default: 5 minutes |
166+
| **Clear failed playlists** | Immediately un-marks all playlists currently flagged as invalid |
167+
168+
This is particularly useful when providers return `403` or `503` errors under load — the editor will temporarily route traffic away from that source without requiring a manual fix.
169+
170+
### Stream Limit Handling
171+
172+
| Setting | Description |
173+
|---------|-------------|
174+
| **Stop oldest stream when limit reached** | When a playlist's stream limit is hit, automatically stops the oldest active stream to free capacity for the new request. Enables instant channel switching on single-connection providers |
175+
176+
---
177+
144178
## Before vs After Failover
145179

146180
### Without failover

docs/proxy/sticky-sessions.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,19 @@ Player: stream jumped, must reload
3434

3535
With sticky sessions enabled, after the first redirect the proxy locks to that backend for all subsequent requests, ensuring monotonic sequence progression.
3636

37-
## Configuration
37+
## Enabling Sticky Sessions
3838

39-
### Global setting
39+
There are three ways to enable sticky sessions, from most specific to most broad:
4040

41-
```bash
42-
USE_STICKY_SESSION=true
43-
```
41+
### Per-Playlist (M3U Editor UI)
4442

45-
Default is `false`.
43+
Open a playlist in the editor and go to the **Proxy Settings** section. Toggle **Enable Sticky Session Handler** on.
4644

47-
### Per-stream override
45+
This applies to all channels from that playlist. It is the recommended approach — you can target only the providers that need it without affecting others.
46+
47+
### Per-Stream (Proxy API)
48+
49+
When calling the proxy API directly, pass `use_sticky_session: true` on the stream creation request:
4850

4951
```bash
5052
curl -X POST "http://localhost:8085/streams" \
@@ -56,7 +58,15 @@ curl -X POST "http://localhost:8085/streams" \
5658
}'
5759
```
5860

59-
Per-stream settings override the global configuration.
61+
### Globally (Environment Variable)
62+
63+
Enable for all streams:
64+
65+
```bash
66+
USE_STICKY_SESSION=true
67+
```
68+
69+
Default is `false`. Per-stream and per-playlist settings override the global configuration.
6070

6171
## When to Enable
6272

docs/proxy/strict-live-ts.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,23 @@ Monitors upstream data flow. If no data arrives for more than 2 seconds (configu
5454

5555
HEAD requests for live TS streams return immediately without hitting the upstream provider. This avoids redundant connections that can interfere with live stream state.
5656

57-
## Quick Start
57+
## Enabling Strict Live TS
5858

59-
### Enable globally (all live TS streams)
59+
There are three ways to enable this feature, from most specific to most broad:
6060

61-
```bash
62-
# .env or docker-compose environment
63-
STRICT_LIVE_TS=true
64-
```
61+
### Per-Playlist (M3U Editor UI)
62+
63+
Open a playlist in the editor and go to the **Proxy Settings** section. Toggle **Enable Strict Live TS Handling** on.
64+
65+
This applies to all channels from that playlist. It is the recommended approach for most users — you can target specific providers without affecting others.
66+
67+
:::note
68+
The **Enable Strict Live TS Handling** option is only relevant when the playlist is **not** using a transcoding profile. If a stream profile is assigned to the playlist, transcoding takes over and strict TS handling is bypassed.
69+
:::
70+
71+
### Per-Stream (Proxy API)
6572

66-
### Enable per stream (via API)
73+
When calling the proxy API directly, pass `strict_live_ts: true` on the stream creation request:
6774

6875
```bash
6976
curl -X POST "http://localhost:8085/streams" \
@@ -76,7 +83,16 @@ curl -X POST "http://localhost:8085/streams" \
7683
}'
7784
```
7885

79-
Per-stream configuration overrides the global setting for that stream.
86+
### Globally (Environment Variable)
87+
88+
Enable for all live TS streams across every playlist:
89+
90+
```bash
91+
# .env or docker-compose environment
92+
STRICT_LIVE_TS=true
93+
```
94+
95+
Per-stream and per-playlist settings override the global setting for that specific stream.
8096

8197
## Configuration
8298

0 commit comments

Comments
 (0)