共通 #

CodecOptions #

opus前缀的只针对音频,是opus编码器选项,使用默认即可。

字段名 类型 描述 必需
opusStereo Boolean Enable OPUS stereo (if the audio source is stereo).
opusFec Boolean Enable OPUS in band FEC.
opusDtx Boolean Enable OPUS discontinuous transmission.
opusMaxPlaybackRate Number Set OPUS maximum playback rate.
opusMaxAverageBitrate Number Set OPUS maximum average bitrate.
opusPtime Number Set OPUS preferred duration of media represented by a packet.
videoGoogleStartBitrate Number Just for libwebrtc based browsers. Set video initial bitrate.
videoGoogleMaxBitrate Number Just for libwebrtc based browsers. Set video maximum bitrate.
videoGoogleMinBitrate Number Just for libwebrtc based browsers. Set video minimum bitrate.

RtpCodecCapability #

无需自行构建,通过接口取得即可

字段名 类型 描述 必需
kind "audio" or "video" Media kind.
mimeType String The codec MIME media type/subtype (e.g. "audio/opus", "video/VP8").
preferredPayloadType Number The preferred RTP payload type.
clockRate Number Codec clock rate expressed in Hertz.
channels Number The number of channels supported (e.g. two for stereo). Just for audio. 否,默认1
parameters Object Codec specific parameters. Some parameters (such as "packetization-mode" and "profile-level-id" in H264 or “profile-id” in VP9) are critical for codec matching.
rtcpFeedback Array Transport layer and codec-specific feedback messages for this codec. format: { type, parameter } 否,默认[]
上次更新: 2/11/2023, 8:32:49 PM