这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
RTCPeerConnection.setIdentityProvider()
method sets the Identity Provider (IdP) to the triplet given in parameter: its name, the protocol used to communicate with it (optional) and an optional username. The IdP will be used only when an assertion is needed.
若
signalingState
被设为
"closed"
,
InvalidStateError
被引发。
pc.setIdentityProvider(domainname [, protocol] [, username]);
There is no return value for this method.
DOMString
is the domain name where the IdP is.
DOMString
representing the protocol used to communicate with the IdP. It defaults to
"default"
and is used to determine the URL where the IdP is listening.
DOMString
representing the username associated with the IdP.
var pc = new PeerConnection();
pc.setIdentityAssertion("developer.mozilla.org");
| 规范 | 状态 | 注释 |
|---|---|---|
|
Identity for WebRTC
The definition of 'RTCPeerConnection.setIdentityProvider()' in that specification. |
候选推荐 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
setIdentityProvider
|
Chrome No | Edge ≤18 — 79 | Firefox 22 | IE No |
Opera
43
|
Safari ? | WebView Android No | Chrome Android No | Firefox Android 44 |
Opera Android
43
|
Safari iOS ? | Samsung Internet Android 6.0 |
完整支持
不支持
兼容性未知
见实现注意事项。
RTCPeerConnection
canTrickleIceCandidates
connectionState
currentLocalDescription
currentRemoteDescription
getDefaultIceServers()
iceConnectionState
iceGatheringState
localDescription
onaddstream
onconnectionstatechange
ondatachannel
onicecandidate
oniceconnectionstatechange
onicegatheringstatechange
onidentityresult
onidpassertionerror
onidpvalidationerror
onnegotiationneeded
onpeeridentity
onremovestream
onsignalingstatechange
ontrack
peerIdentity
pendingLocalDescription
pendingRemoteDescription
remoteDescription
sctp
signalingState
addIceCandidate()
addStream()
addTrack()
close()
createAnswer()
createDataChannel()
createOffer()
generateCertificate()
getConfiguration()
getIdentityAssertion()
getReceivers()
getSenders()
getStats()
getStreamById()
getTransceivers()
removeStream()
removeTrack()
restartIce()
setConfiguration()
setIdentityProvider()
setLocalDescription()
setRemoteDescription()
MediaDevices.getUserMedia()
Navigator.mediaDevices
RTCCertificate
RTCDTMFSender
RTCDTMFToneChangeEvent
RTCDataChannel
RTCDataChannelEvent
RTCDtlsTransport
RTCErrorEvent
RTCIceCandidate
RTCIceTransport
RTCPeerConnectionIceErrorEvent
RTCPeerConnectionIceEvent
RTCRtpReceiver
RTCRtpSender
RTCRtpTransceiver
RTCSctpTransport
RTCSessionDescription
RTCStatsEvent
RTCStatsReport
RTCTrackEvent