这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
The property
RTCSessionDescription.type
is a read-only value of type
RTCSdpType
which describes the description's type.
var value = sessionDescription.type; sessionDescription.type = value;
The possible values are defined by an enum of type RTCSdpType.
The allowed values are those of an enum of type
RTCSdpType
:
"offer"
, the description is the initial proposal in an offer/answer exchange.
"answer"
, the description is the definitive choice in an offer/answer exchange.
"pranswer"
, the description is a provisional answer and may be changed when the definitive choice will be given.
rollback
", the description rolls back to offer/answer state to the last stable state.
// The remote description has been set previously on pc, a RTCPeerconnection alert(pc.remoteDescription.type);
| 规范 | 状态 | 注释 |
|---|---|---|
|
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCSessionDescription.type' in that specification. |
候选推荐 | 最初的规范。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
type
|
Chrome Yes | Edge 15 |
Firefox
Yes
Prefixed
|
IE No | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
完整支持
不支持
实验。期望将来行为有所改变。
要求使用供应商前缀或不同名称。
RTCSessionDescription
sdp
type
MediaDevices.getUserMedia()
Navigator.mediaDevices
RTCCertificate
RTCDTMFSender
RTCDTMFToneChangeEvent
RTCDataChannel
RTCDataChannelEvent
RTCDtlsTransport
RTCErrorEvent
RTCIceCandidate
RTCIceTransport
RTCPeerConnection
RTCPeerConnectionIceErrorEvent
RTCPeerConnectionIceEvent
RTCRtpReceiver
RTCRtpSender
RTCRtpTransceiver
RTCSctpTransport
RTCStatsEvent
RTCStatsReport
RTCTrackEvent