Recording · function

clipEncodingSupported

Whether this browser will encode a clip of this size, at this rate, at this bitrate.

Explained in Recording and clips.

function clipEncodingSupported(request: ClipEncodeRequest): Promise<boolean>
import { clipEncodingSupported } from '@driftengine/media';

Parameters

ParameterTypeDescription
requestClipEncodeRequest

In depth

The question ClipEncoder.open is about to ask, asked early enough to grey out a control instead of failing an export somebody already chose. It walks the same ladder open walks, so the two cannot drift; a gate built from a copied codec string offered ten sizes the export would refuse, which is the fault this exists to make unrepeatable.

Memoised on the whole request, because the answer is a property of the machine rather than of the moment: a panel asking about nine sizes at two rates costs eighteen probes at boot and nothing afterwards. The promise is stored rather than the result, so eighteen concurrent asks about one size are one probe.

False when WebCodecs is absent, which is the same answer from the caller's point of view. What it does not answer: whether the frames arrive once encoding starts. See framesReachEncoder.