RTCPeerConnection:getIdentityAssertion() 方法

RTCPeerConnection 介面的 getIdentityAssertion() 方法會啟動身份斷言的收集。僅當 signalingState 不是 "closed" 時,此方法才有效。

應用程式處理 RTCPeerConnection 時不期望顯式呼叫此方法:它會自動執行;顯式呼叫僅允許提前滿足此需求。

語法

js
getIdentityAssertion()

引數

無。

返回值

一個 Promise,它會解析為一個編碼為字串的身份斷言。

示例

js
const pc = new RTCPeerConnection();

pc.setIdentityProvider("developer.mozilla.org");
const assertion = await pc.getIdentityAssertion();

規範

規範
WebRTC 1.0 的身份
# dom-rtcpeerconnection-getidentityassertion

瀏覽器相容性

另見