let pc = new RTCPeerConnection();
// …
async function getIdentityAssertion(pc) {
try {
const identity = await pc.peerIdentity;
return identity;
} catch (err) {
console.log("Error identifying remote peer: ", err);
return null;
}
}RTCPeerConnection: peerIdentity property / notebook
RTCPeerConnection: peerIdentity property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.