RTCTransportStats: thuộc tính dtlsRole

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Thuộc tính dtlsRole của từ điển RTCTransportStats là một chuỗi chỉ ra vai trò của RTCPeerConnection liên quan trong quá trình đàm phán DTLS.

Cụ thể, cho biết nó hoạt động như một máy chủ và lắng nghe kết nối, hay như một máy khách và khởi tạo kết nối, hoặc là đàm phán chưa bắt đầu.

Giá trị

Một chuỗi chỉ ra vai trò DTLS. Đây sẽ là một trong các giá trị sau:

client

Peer đã khởi tạo DTLS handshake.

server

Peer đã chờ DTLS handshake.

unknown

Đàm phán DTLS chưa bắt đầu.

Thông số kỹ thuật

Specification
Identifiers for WebRTC's Statistics API
# dom-rtctransportstats-dtlsrole

Tương thích trình duyệt