PrismCore / API reference / HLS playlists
Enumeration
MasterRejection
enum MasterRejectionDeclared in Sources/PrismCore/HLS/MasterRejection.swift · PrismCore 3.5.4
Recognizes the failures that mean "AVPlayer refused the master playlist", as opposed to the source being unplayable.
The distinction matters because the two look identical from the host's side — an AVPlayerItem that went .failed — but the remedies are opposites: a refused master plays perfectly as a media-direct session (forceMuxedShape), while a genuinely unplayable source has to fall back to Prism. Getting it wrong either way is a user-visible failure, so the codes are named here once instead of being re-typed at each call site.
The three codes
-11868AVErrorNoCompatibleAlternatesForExternallyPausedVideo— every variant was rejected by the compatibility gate. What advh1claim gets from a non-DV display, and what an over-claimedCODECSstring gets from a decoder that can't take it.-11848— the SDR-parked-panel rejection: aVIDEO-RANGE=PQ/HLGvariant offered to a display that is not going to leave SDR.DisplayCapabilitiesreads readiness optimistically (Match Content is the common case and cannot be distinguished from Match-Content-off), so this is the code that catches the optimism being wrong.-1002NSURLErrorUnsupportedURL— every variant was filtered while parsing the master, so AVPlayer never fetched a media playlist at all and reports the manifest URL as unsupported. An HDR variant with noFRAME-RATEis the classic cause (whichMasterPlaylistBuilderrefuses to emit for exactly this reason), but a served master can still earn it.
Codes are matched across error domains on purpose: -11868/-11848 arrive in AVFoundationErrorDomain while -1002 arrives in NSURLErrorDomain, none of the three collides with a code the other domain uses, and pinning domains would only add a way to miss a match.
Type properties
static let errorCodes: Set<Int>The codes, as a set, so a host can match them itself.
Type methods
static func matches(_ error: (any Error)?) -> BoolDoes this error mean the master was refused?
Walks NSUnderlyingErrorKey because the code is routinely nested: AVPlayerItem.error is typically an AVFoundationErrorDomain wrapper whose underlying error carries the real reason, and checking only the outer layer misses most real rejections.
Generated from the public symbols of PrismCore 3.5.4. All types