Commit graph

33 commits

Author SHA1 Message Date
SergeantPanda
92f98a24c7 fix: increase ghost client multiplier to improve client detection timing 2026-03-15 20:45:55 -05:00
None
40d0bc9567 fix: cap keepalive mode duration to prevent indefinite client hold
- Add MAX_KEEPALIVE_DURATION = 300s to TSConfig
- Track keepalive_start_time in _stream_data_generator; disconnect after cap is exceeded with a warning log
- Reset timer on real data so independent stalls don't accumulate
- Fix pre-existing test helper missing throttle attributes in NonOwnerWorkerKeepaliveTests
2026-03-15 14:22:57 -05:00
SergeantPanda
78aa8cf353 Enhancement: Change default new client behind seconds from 2 to 5 for stability. 2026-03-05 15:36:12 -06:00
SergeantPanda
fc75a68195 Enhancement: new clients joining an active channel are now positioned a configurable number of seconds behind live rather than a fixed chunk count. The start position is determined by wall-clock chunk receive time (stored as a Redis sorted set alongside the buffer), so the buffer depth is consistent in seconds regardless of stream bitrate. Setting the value to 0 starts clients at live with no buffer. Defaults to 2 seconds. Existing chunk-count gating for the first client connecting to a channel is unchanged. The setting is exposed in Settings → Proxy as "New Client Buffer (seconds)". 2026-03-03 18:12:32 -06:00
SergeantPanda
6715bc7c5c Enhancement: Update TTL settings for client records and implement periodic refresh during active streaming 2025-10-31 11:53:16 -05:00
SergeantPanda
9b2ebf169b Better database connection cleanup. 2025-10-16 14:22:19 -05:00
SergeantPanda
ed065f718d Enhancement: Implement caching for proxy settings to improve performance and reduce database load. Also, ensure database connections are closed after use in both config and stream manager. 2025-10-14 13:44:28 -05:00
SergeantPanda
2284d47f9f If provider is slow but responsive, don't get locked up. 2025-07-08 17:10:55 -05:00
SergeantPanda
d6605e7119 Add timeout for chunks. 2025-07-08 15:57:11 -05:00
SergeantPanda
c4a6b1469e Change to JSON settings 2025-06-13 14:36:08 -05:00
SergeantPanda
b4ae6911c9 Pull settings from database 2025-06-12 15:42:26 -05:00
SergeantPanda
a2c7fc3046 [New feature]
Switch streams when buffering is detected.
2025-06-10 17:43:37 -05:00
SergeantPanda
898224dc72 Fix potential issue during stream switches. 2025-05-05 17:02:28 -05:00
SergeantPanda
60fd5afd94 More robust stream switches. Has client wait if in switching state. 2025-04-14 21:03:33 -05:00
SergeantPanda
07485f87a3 Add stream health recovery and reconnection logic 2025-04-10 10:14:22 -05:00
SergeantPanda
6ccc2b9a6d Enhance stream retrieval process with error handling and retry logic
- Updated `get_stream` method to return error reasons for better debugging.
- Improved `generate_stream_url` to handle errors and log specific issues.
- Implemented retry mechanism in `stream_ts` view for obtaining streams with exponential backoff.
- Added new configuration options for connection timeout and retry intervals.
2025-04-10 08:38:53 -05:00
SergeantPanda
d6a452548c Automatic stream switching is working. 2025-03-20 15:28:12 -05:00
SergeantPanda
a4c69710b7 Stream switching is working for both proxy and transcode 2025-03-15 17:23:06 -05:00
SergeantPanda
f69dfed3e8 Require clients to wait until initial_behind_chunks is reached. 2025-03-15 15:32:19 -05:00
SergeantPanda
8f8b4ef371 More refractoring and slight modifications. 2025-03-15 14:35:34 -05:00
SergeantPanda
69f4ceb137 Streaming is working fairly well now. 2025-03-13 15:56:04 -05:00
SergeantPanda
d00aa3444e Switched back to http connections instead of socket. 2025-03-13 13:15:48 -05:00
SergeantPanda
1284567409 Client cleanup is working much better now. 2025-03-11 22:07:19 -05:00
SergeantPanda
fa5fc86c99 Disconnects are working better now. 2025-03-10 17:56:09 -05:00
SergeantPanda
ed30b8608d Most of the functionality is there now. 2025-03-09 20:13:52 -05:00
SergeantPanda
5563bd0d5e Switched to owner staying as initializer. 2025-03-09 19:37:15 -05:00
SergeantPanda
47c6346a6b When last client disconnects and the channel. 2025-03-09 16:23:50 -05:00
SergeantPanda
e22e06aa61 Set ttl to 60 seconds 2025-03-09 15:56:08 -05:00
SergeantPanda
07cc8c644b Updated config 2025-03-09 15:13:22 -05:00
SergeantPanda
2509553095 Streaming is working very well. 2025-03-09 15:10:56 -05:00
SergeantPanda
8e624b9d1a Fixes clients disconnecting when reaching eof 2025-03-09 14:55:14 -05:00
SergeantPanda
3b3e5f7b52 Waits for api to return status until stream is running. 2025-03-04 12:03:09 -06:00
SergeantPanda
85e41d5def Initial integration. 2025-03-03 18:40:30 -06:00