Skip to content
1 min read · 110 words

Function: createMediaPipeline()

ts
function createMediaPipeline(
  config?: MediaPipelineConfig,
): Promise<MediaPipeline>;

Defined in: src/batteries/media/index.ts:304

Create a media pipeline.

Parameters

ParameterTypeDescription
configMediaPipelineConfigEngines, selection stages, step interceptors, and the media-ref resolver.

Returns

Promise<MediaPipeline>

The callable MediaPipeline.

Remarks

Config is validated eagerly, and so are the engines: every resolver in the array runs at construction (capability declarations drive verb narrowing, so they must be known up front), each result is contract-checked, and failures throw E_INVALID_MEDIA_PIPELINE_CONFIG naming the offending index. Construction stays cheap — bundled engine modules import their heavy peer dependencies lazily inside capability methods, on first actual use.