Skip to main content

Function: assertValidAudioFilters()

function assertValidAudioFilters(filters: readonly AudioFilter[]): void;

Defined in: packages/player/src/filters.ts:183

Validate a whole chain before it is written.

Catches the things mpv would reject with a generic "error accessing property" — names that cannot be parsed, empty option keys, values carrying an unescapable byte. Range checks live in the factories, where the filter's documented bounds are known.

Parameters

ParameterTypeDescription
filtersreadonly AudioFilter[]The chain to check.

Returns

void

Throws

PlayerErrorException with code invalid-state.