Documentation
    Preparing search index...

    Function selectCaptureMimeType

    • Pick the first advertised MIME type compatible with the request list.

      Parameters

      • advertised: readonly string[]

        Runtime formats in preference order.

      • requested: readonly string[]

        Caller formats in preference order (empty = any).

      Returns string | undefined

      The normalized advertised type, undefined when none fits, or 'invalid' when a request item is malformed.

      selectCaptureMimeType(['audio/webm;codecs=opus'], ['AUDIO/WEBM']) === 'audio/webm;codecs=opus';