共通 #
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 } | 否,默认[] |