An instance of the
WebRTC
API's
RTCRtpEncodingParameters
dictionary describes a single configuration of a
codec
对于
RTCRtpSender
.
It's used in the
RTCRtpSendParameters
describing the configuration of an RTP sender's
encodings
;
RTCRtpDecodingParameters
is used to describe the configuration of an RTP receiver's
encodings
.
active
true
, the described encoding is currently actively being used. That is, for RTP senders, the encoding is currently being used to send data, while for receivers, the encoding is being used to decode received data. The default value is
true
.
codecPayloadType
RTCRtpSender
,
codecPayloadType
is a single 8-bit byte (or octet) specifying the codec to use for sending the stream; the value matches one from the owning
RTCRtpParameters
对象的
codecs
parameter. This value can only be set when creating the transceiver; after that, this value is read only.
dtx
RTCRtpSender
whose
kind
is
audio
, this property indicates whether or not to use discontinuous transmission (a feature by which a phone is turned off or the microphone muted automatically in the absence of voice activity). The value is taken from the enumerated string type
RTCDtxStatus
.
maxBitrate
maxFramerate
or transport or physical network limitations.
maxFramerate
A double-precision floating-point value specifying the maximum number of frames per second to allow for this encoding.
ptime
An unsigned long integer value indicating the preferred duration of a media packet in milliseconds. This is typically only relevant for audio encodings. The user agent will try to match this as well as it can, but there is no guarantee.
rid
DOMString
which, if set, specifies an
RTP stream ID
(
RID
) to be sent using the RID header extension. This parameter cannot be modified using
setParameters()
. Its value can only be set when the transceiver is first created.
scaleResolutionDownBy
kind
is
视频
, this is a double-precision floating-point value specifying a factor by which to scale down the video during encoding. The default value, 1.0, means that the sent video's size will be the same as the original. A value of 2.0 scales the video frames down by a factor of 2 in each dimension, resulting in a video 1/4 the size of the original. The value must not be less than 1.0 (you can't use this to scale the video up).
| 规范 | 状态 | 注释 |
|---|---|---|
|
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCRtpEncodingParameters' in that specification. |
候选推荐 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RTCRtpEncodingParameters
|
Chrome 67 | Edge ≤79 | Firefox 46 | IE No | Opera ? | Safari ? | WebView Android 67 | Chrome Android 67 | Firefox Android 46 | Opera Android ? | Safari iOS ? | Samsung Internet Android 9.0 |
active
|
Chrome 67 | Edge ≤79 | Firefox 46 | IE No | Opera ? | Safari ? | WebView Android 67 | Chrome Android 67 | Firefox Android 46 | Opera Android ? | Safari iOS ? | Samsung Internet Android 9.0 |
codecPayloadType
|
Chrome No | Edge No | Firefox No | IE No | Opera ? | Safari ? | WebView Android No | Chrome Android No | Firefox Android No | Opera Android ? | Safari iOS ? | Samsung Internet Android No |
dtx
|
Chrome No | Edge No | Firefox No | IE No | Opera ? | Safari ? | WebView Android No | Chrome Android No | Firefox Android No | Opera Android ? | Safari iOS ? | Samsung Internet Android No |
fec
非标
|
Chrome No | Edge No |
Firefox
46
|
IE No | Opera No | Safari No | WebView Android No | Chrome Android No |
Firefox Android
46
|
Opera Android No | Safari iOS No | Samsung Internet Android No |
maxBitrate
|
Chrome 67 | Edge ≤79 | Firefox 46 | IE No | Opera ? | Safari ? | WebView Android 67 | Chrome Android 67 | Firefox Android 46 | Opera Android ? | Safari iOS ? | Samsung Internet Android 9.0 |
maxFramerate
|
Chrome No | Edge No | Firefox No | IE No | Opera ? | Safari ? | WebView Android No | Chrome Android No | Firefox Android No | Opera Android ? | Safari iOS ? | Samsung Internet Android No |
priority
弃用
非标
|
Chrome
67
|
Edge
≤79
|
Firefox
46
|
IE No | Opera ? | Safari ? |
WebView Android
67
|
Chrome Android
67
|
Firefox Android
46
|
Opera Android ? | Safari iOS ? |
Samsung Internet Android
9.0
|
ptime
|
Chrome No | Edge No | Firefox No | IE No | Opera ? | Safari ? | WebView Android No | Chrome Android No | Firefox Android No | Opera Android ? | Safari iOS ? | Samsung Internet Android No |
rid
非标
|
Chrome No | Edge No |
Firefox
46
|
IE No | Opera No | Safari No | WebView Android No | Chrome Android No |
Firefox Android
46
|
Opera Android No | Safari iOS No | Samsung Internet Android No |
rtx
非标
|
Chrome No | Edge No |
Firefox
46
|
IE No | Opera No | Safari No | WebView Android No | Chrome Android No |
Firefox Android
46
|
Opera Android No | Safari iOS No | Samsung Internet Android No |
scaleResolutionDownBy
|
Chrome 74 | Edge No | Firefox 46 | IE No | Opera ? | Safari ? | WebView Android 74 | Chrome Android 74 | Firefox Android 46 | Opera Android ? | Safari iOS ? | Samsung Internet Android 11.0 |
ssrc
非标
|
Chrome No | Edge No |
Firefox
46
|
IE No | Opera No | Safari No | WebView Android No | Chrome Android No |
Firefox Android
46
|
Opera Android No | Safari iOS No | Samsung Internet Android No |
完整支持
不支持
兼容性未知
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
见实现注意事项。
RTCRtpSender
,
RTCRtpReceiver
,和
RTCRtpTransceiver
RTCRtpEncodingParameters
MediaDevices.getUserMedia()
Navigator.mediaDevices
RTCCertificate
RTCDTMFSender
RTCDTMFToneChangeEvent
RTCDataChannel
RTCDataChannelEvent
RTCDtlsTransport
RTCErrorEvent
RTCIceCandidate
RTCIceTransport
RTCPeerConnection
RTCPeerConnectionIceErrorEvent
RTCPeerConnectionIceEvent
RTCRtpReceiver
RTCRtpSender
RTCRtpTransceiver
RTCSctpTransport
RTCSessionDescription
RTCStatsEvent
RTCStatsReport
RTCTrackEvent