MediaIoResolver

fun interface MediaIoResolver

Turns a URI into a MediaIo when it knows how, at open time (the Ktor half). Explicitly configured through PlayerConfig.network or supplied by an installed optional provider. The engine consults it when a MediaItem has no MediaItem.io of its own. Returning null from an explicit resolver passes the URI through to the backend untouched, which is what keeps local files on FFmpeg's own fast path.

This is how https plays on phones: the engine's FFmpeg profile deliberately vendors no TLS backend (its protocol list is pinned to file/fd/pipe/data/http/tcp), so a resolver such as kiteplayer-network's Ktor one carries the bytes with the OS supplying TLS.

Functions

Link copied to clipboard
abstract suspend fun resolve(uri: String): MediaIo?

A new MediaIo for uri, or null when this resolver does not handle it.

open suspend fun resolve(uri: String, headers: Map<String, String>): MediaIo?

Resolves uri with this item's HTTP request headers. Existing resolvers keep their one-argument behavior unless they override this overload. Returning null deliberately selects backend URI handling when this resolver was explicitly configured.