PrismCore / API reference / Loopback server

Protocol

SegmentProvider

protocol SegmentProvider : Sendable

Declared in Sources/PrismCore/Loopback/SegmentProvider.swift · PrismCore 3.5.4

The server's payload seam. LoopbackHTTPServer never touches the filesystem itself: it asks a provider for a path and frames whatever comes back.

v0 ships DirectorySegmentProvider (serve what's on disk, instantly). The demand-driven producer of the seek phase plugs in here instead: it can answer .pending for a segment it is about to cut, and the server keeps AVPlayer's watchdog fed on its behalf.

Instance methods

func data(forPath path: String) async -> ProviderResult

path is already normalized: root-relative, percent-decoded, query stripped, and rejected if it tried to escape (the server does that before asking).

Generated from the public symbols of PrismCore 3.5.4. All types