Skip to main content

Type Alias: BuiltInSourceRewrite

type BuiltInSourceRewrite = (uri: string) => string;

Defined in: packages/player/src/source-resolver.ts:117

A rewrite this library performs itself, before and after the app's resolver.

Today there is exactly one: Android's content:// → fd:// (see src/content-uri.ts). It is a stage of the same seam rather than a second mechanism, so an app that installs a resolver and an app that does not get the same rewrite, with the same caching and the same determinism guarantee.

Parameters​

ParameterTypeDescription
uristringThe URI as it stands at this point in the pipeline.

Returns​

string

The URL to use, or uri unchanged when there is nothing to do.

Throws​

A typed error the controller reports on its error channel.