RTCRtpCapabilities
dictionary is a data type used to describe the capabilities of an
RTCRtpSender
or
RTCRtpReceiver
in response to a call to the
RTCRtpSender.getCapabilities()
or
RTCRtpReceiver.getCapabilities()
static functions, both of which return an array of
RTCRtpCapabilities
对象。
An
RTCRtpCapabilities
object contains an array of objects conforming to
RTCRtpCodecCapability
(each describing the capabilities of one codec) and an array of the supported
RTP
header extensions
for that codec.
codecs
RTCRtpCodecCapability
objects, each describing one of the codecs supported by the
RTCRtpSender
or
RTCRtpReceiver
. There are some special entries in this array, described below in the section
The codecs array
.
headerExtensions
RTCRtpHeaderExtensionCapability
dictionary. Each object contains a single
DOMString
,
uri
, specifying the URI of the header extension, as described in
RFC 5285
.
codecs
array is an array of objects conforming to the dictionary
RTCRtpCodecCapability
. Each of these objects describes a single codec and its basic capabilities. Its properties are:
The browser will only report distinct capability combinations separately. If two sets of capabilities can be described as one, they will be. That means that, for instance, if there are two entries for the H.264 codec (as identified by the
mimeType
being "video/H264"), there are other values in the capabilities objects indicating how they're different in some way.
The MIME type strings used by RTP differ from those used elsewhere. See RFC 3555, section 4 for the complete IANA registry of these types.
There are three special entries that should always be present, representing underlying components of the transport. Those components are:
red
,譬如
video/red
or
video/fwdred
. The base RED standard can be found in
RFC 2198
. There may be multiple entries for RED if different forms are supported; each will have a unique media type in that case.
fec
. One possible value is
video/ulpfec
(a generic error connection model). There may also be multiple FEC entries if more than one form is supported.
video/rtx
. There will only be one entry for RTX, and it will not have an
sdpFmtpLine
特性。
Don't be surprised to see these show up ijn the list; be prepared to ignore them if you're only interested in the actual codecs used for the media itself.
| 规范 | 状态 | 注释 |
|---|---|---|
|
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCRtpCapabilities' in that specification. |
候选推荐 |
No compatibility data found. Please contribute data for "api.RTCRtpCapabilities" (depth: 1) to the MDN 兼容性数据存储库 .
RTCPeerConnection
RTCSessionDescription
RTCIceCandidate
RTCPeerConnectionIceEvent
RTCPeerConnectionIceErrorEvent
RTCCertificate
RTCRtpSender
RTCRtpReceiver
RTCRtpTransceiver
RTCDtlsTransport
RTCIceTransport
RTCTrackEvent
RTCSctpTransport
RTCDataChannel
RTCDataChannelEvent
RTCDTMFSender
RTCDTMFToneChangeEvent
RTCStatsReport
RTCErrorEvent
RTCDTMFSender
:
tonechange
RTCDataChannel
:
bufferedamountlow
RTCDataChannel
:
close
RTCDataChannel
:
closing
RTCDataChannel
:
error
RTCDataChannel
:
message
RTCDataChannel
:
open
RTCDtlsTransport
:
error
RTCDtlsTransport
:
statechange
RTCIceTransport
:
error
RTCIceTransport
:
gatheringstatechange
RTCIceTransport
:
selectedcandidatepairchange
RTCIceTransport
:
statechange
RTCPeerConnection
:
connectionstatechange
RTCPeerConnection
:
datachannel
RTCPeerConnection
:
icecandidate
RTCPeerConnection
:
icecandidateerror
RTCPeerConnection
:
iceconnectionstatechange
RTCPeerConnection
:
icegatheringstatechange
RTCPeerConnection
:
negotiationneeded
RTCPeerConnection
:
signalingstatechange
RTCPeerConnection
:
track
RTCSctpTransport
:
error