From 32395e16a0a5c2b78373488ee4acef76027dd9e0 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 1 Feb 2026 20:08:42 +0000 Subject: [PATCH] fix(playback): disable timeout for webtorrent-only sources When a video has no fallback URL (CDN), the playback service now waits indefinitely for peers instead of timing out after 3 seconds. This prevents premature failures for WebTorrent-only content. Ref: `js/services/playbackService.js` Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- js/services/playbackService.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/services/playbackService.js b/js/services/playbackService.js index 3a35e226..5502be15 100644 --- a/js/services/playbackService.js +++ b/js/services/playbackService.js @@ -1187,10 +1187,14 @@ class PlaybackSession extends SimpleEventEmitter { // Try Torrent First if (this.magnetForPlayback) { try { + // If we have a fallback URL, use the effective timeout. + // Otherwise, we must wait indefinitely for peers because there is no plan B. + const torrentTimeout = httpsUrl ? effectiveTimeout : 0; + // Wrap Torrent attempt in timeout const torrentResult = await withTimeout( attemptTorrentPlayback("preference"), - effectiveTimeout, + torrentTimeout, "Torrent Playback" );