• Public
  • Public/Protected
  • All

Class VideoCodecCapability

VideoCodecCapability represents a higher level type to wrap RTCRtpCodecCapability and the codec name used in the SDP, while also namespacing static create functions for codecs supported in the SDK.

Note that codecName is different then codecCapability.mimeType


  • VideoCodecCapability





  • new VideoCodecCapability(codecName: string, codecCapability: RTCRtpCodecCapability): VideoCodecCapability


Readonly codecCapability

codecCapability: RTCRtpCodecCapability

Readonly codecName

codecName: string




  • fmtpLineMatches(line: string, expectedPayloadType: number): boolean
  • Returns whether the codec capability fmtp line matches. This will not attempt to match H.264 profile levels (e.g. 5.2, 3.1), see internal comments for more detailed information.

    This function is meant to only be used internally.


    • line: string
    • expectedPayloadType: number

    Returns boolean

Static av1

Static av1Main

Static fromSignaled

Static h264

Static h264BaselineProfile

Static h264ConstrainedBaselineProfile

  • Returns the configuration of H.264 CBP supported by the SDK.

    This profile is required in all WebRTC implementations and typically uses software for the encode for stability. Hardware decode is common.

    Returns VideoCodecCapability

Static h264ConstrainedHighProfile

Static h264HighProfile

  • Returns the configuration of H.264 High Profile supported by the SDK.

    Currently most browsers do not have software fallback for high profile which may impact stability. Its usage should be done with caution.

    On MacOS, until https://bugs.chromium.org/p/chromium/issues/detail?id=1520287 is resolved, receivers will fail to allocate the decoder for this profile if the sender switches away and back to this codec (e.g. fallback for a Firefox receiver, and then recovery when the Firefox receiver leaves).

    If you expect a decent amount of iOS safari traffic, you should include h264ConstrainedHighProfile in your preferences as well. It will be forwarded as High profile to receivers that negotiated High but not Constrained High

    Returns VideoCodecCapability

Static h264MainProfile

  • Returns the configuration of H.264 Main Profile supported by the SDK

    This profile is more likely to use hardware for encode on most browsers then constrained baseline profile. It may have modest quality/bitrate improvements over baseline/constrained baseline profile.

    Returns VideoCodecCapability

Static vp8

Static vp9

Static vp9Profile0

Generated using TypeDoc