RTCPeerConnectionIceEvent: url property
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Thuộc tính chỉ đọc url của giao diện RTCPeerConnectionIceEvent trả về URL của máy chủ STUN hoặc TURN được dùng để thu thập ứng viên ICE đã kích hoạt sự kiện. Nếu ứng viên không được thu thập từ máy chủ STUN hoặc TURN, giá trị là null.
Note:
Thuộc tính này được coi là đã lỗi thời theo thông số kỹ thuật, thay thế bằng thuộc tính url trên giao diện RTCIceCandidate.
Giá trị
Một chuỗi chứa URL của máy chủ STUN hoặc TURN được dùng để thu thập ứng viên này, hoặc null nếu ứng viên không được thu thập từ máy chủ (ví dụ như ứng viên local host).
Ví dụ
>Ghi log URL máy chủ ICE
pc.onicecandidate = (event) => {
if (event.candidate) {
console.log(`Candidate gathered from: ${event.url}`);
}
};
Thông số kỹ thuật
| Specification |
|---|
| WebRTC: Real-Time Communication in Browsers> # dom-rtcpeerconnectioniceevent-url> |