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 <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-01 20:08:42 +00:00
1 parent 4142478400
commit 32395e16a0
1 file changed
+5 -1
+5 -1
View File
@@ -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"
);