/** * Returns a key that is equal for two codec options only when they describe the same codec. This mirrors WebRTC's * codec comparison (see media/base/codec_comparators.cc): parameters that are negotiated rather than identifying * (such as H.264, H.265 and AV1 levels) are ignored, and missing parameters take their SDP defaults. * @param codec A codec option of the form " " * @returns The codec name followed by its identifying parameters */ export declare function getCodecIdentity(codec: string): string; /** * @param codec A codec capability reported by the browser * @returns The capability as a codec option of the form " " */ export declare function getCodecOption(codec: RTCRtpCodec): string; /** * Resolves a preferred codec to the closest of the codecs that can actually be used. The preferred codec is chosen * before the remote peer's codecs are known (by default it is the browser's first H.264 profile), so it can be a * profile the remote peer never offered. Preferring it as-is would make the browser skip it and fall through to its * own codec order instead. * @param preferredCodec The codec option the user prefers * @param supportedCodecs The codec options that can be used * @returns The supported codec matching the preferred one exactly, else one describing the same codec, else the first * of the same codec family, or undefined when no supported codec is of the preferred codec family. */ export declare function resolvePreferredCodec(preferredCodec: string, supportedCodecs: string[]): string | undefined; /** * Orders the browser's codec capabilities for RTCRtpTransceiver.setCodecPreferences. Capabilities matching * orderedCodecs come first and in that order, followed by every other capability in the browser's order so that * nothing the browser supports (e.g. rtx, red and ulpfec) is dropped. * @param capabilities The browser's codec capabilities * @param orderedCodecs The codec options to put first, most preferred first * @returns The capabilities in order of preference */ export declare function orderCodecCapabilities(capabilities: RTCRtpCodec[], orderedCodecs: string[]): RTCRtpCodec[];