Skip to content

fix(errors): a refused live join says so, instead of reading as an unreadable source - #779

Merged
superuser404notfound merged 1 commit into
superuser404notfound:mainfrom
jpsts:fix/live-join-refusal-error
Oct 15, 2026
Merged

superuser404notfound merged 1 commit into
superuser404notfound:mainfrom
jpsts:fix/live-join-refusal-error

Conversation

@jpsts

@jpsts jpsts commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

When a known HLS playlist on the live path is loaded through the engine's own ingest, and the playlist is refused at the join, the probe sees no bytes. The load then publishes customSourceProbeFailed.

A host reads that as a stream the engine cannot play. One that falls back to another route on it, as an IPTV host does with AVPlayer's own HLS for playlists the ingest can't read (fMP4, SAMPLE-AES), moved the channel there for the rest of the session. It lost the loopback session's DVR window with it, and all over a 509 that an IPTV panel gives while another device holds the account's last connection.

The change

The load now publishes the origin's answer, as an HTTP reader's failed open does in publishLoadFailure:

  • sourceRateLimited (429/503/509) or sourceRefused, with the status in underlyingCode;
  • liveSourceUnavailable when the playlist could not be reached at all.

Any other custom-source probe failure still publishes customSourceProbeFailed. docs/api.md says so beside it.

Tests

  • PlaybackErrorInfoTests: a refused live join, for 509 and for 403 (a loopback origin), and an unreachable one (127.0.0.1:1). All three fail on main.
  • Suites run: PlaybackErrorInfoTests, DocumentedConstantsTests and PublicAPIDocumentationTests pass.
  • Full suite: passes apart from the LAN peer test, as in the companion PR.

Test plan: macOS 26, by the tests above. Every live join in the field sessions behind the companion PR was served, so this path has not met a real refusal yet.

…readable source

When the live HLS ingest's playlist was refused at the join, the probe saw no bytes and the load
published customSourceProbeFailed, which a host reads as a stream it cannot play; one that falls back
to another route on it moved the channel there for the rest of its session, over a 509 an IPTV panel
gives while another device holds the account's last slot.

The load now publishes the origin's answer, as an HTTP reader's failed open does: sourceRateLimited
(429/503/509) or sourceRefused with the status in underlyingCode, or liveSourceUnavailable when the
playlist could not be reached. docs/api.md says so beside customSourceProbeFailed.

Tests: PlaybackErrorInfoTests (refused join for 509 and 403, unreachable join).
superuser404notfound pushed a commit that referenced this pull request Oct 15, 2026
… so, instead of reading as an unreadable source
@superuser404notfound
superuser404notfound merged commit a8ca9ef into superuser404notfound:main Oct 15, 2026
@superuser404notfound

Copy link
Copy Markdown
Owner

Merged in 0785ee5 on top of the #778 follow-up (a16ad60), thanks @jpsts. Only CHANGELOG.md needed a hand merge. On the merged tree, PlaybackErrorInfoTests and the HLSLiveIngestRefusal suite pass in swift-testing, DocumentedConstantsTests and PublicAPIDocumentationTests in XCTest. Ships with the next release, which also carries #778.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants