diff --git a/js/services/playbackService.js b/js/services/playbackService.js index 6abb2d5d..c927ed82 100644 --- a/js/services/playbackService.js +++ b/js/services/playbackService.js @@ -988,15 +988,35 @@ class PlaybackSession extends SimpleEventEmitter { { once: true } ); - const probeResult = await this.service.probeHostedUrl({ - url: candidateUrl, - magnet: this.trimmedMagnet, - probeUrl, - }); + // The probe (fetch HEAD) only helps DECIDE whether to fail over to P2P + // fast. When the URL is the only source there's nothing to fail over + // to — and the probe's timeout (URL_PROBE_TIMEOUT_MS, 4s) is LONGER than + // the playback-start window (PLAYBACK_START_TIMEOUT, 3s), so a slow + // no-cors HEAD (e.g. archive.org) would consume the whole budget and the + // attempt would time out before `src` is ever set → a false "No playable + // source found." So skip the probe when there's no magnet and let the + // video element (the real arbiter) load the URL directly. + const probeResult = + this.magnetForPlayback + ? await this.service.probeHostedUrl({ + url: candidateUrl, + magnet: this.trimmedMagnet, + probeUrl, + }) + : { outcome: "skipped-url-only" }; const probeOutcome = probeResult?.outcome || "error"; const probeStatus = probeResult?.status || "unknown"; + // A `