RTCIceCandidate.webidl (1870B)
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 * You can obtain one at http://mozilla.org/MPL/2.0/. 5 * 6 * The origin of this IDL file is 7 * https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface 8 */ 9 10 dictionary RTCIceCandidateInit { 11 DOMString candidate = ""; 12 DOMString? sdpMid = null; 13 unsigned short? sdpMLineIndex = null; 14 DOMString? usernameFragment = null; 15 }; 16 17 enum RTCIceComponent { 18 "rtp", 19 "rtcp" 20 }; 21 22 enum RTCIceProtocol { 23 "udp", 24 "tcp" 25 }; 26 27 enum RTCIceCandidateType { 28 "host", 29 "srflx", 30 "prflx", 31 "relay" 32 }; 33 34 enum RTCIceTcpCandidateType { 35 "active", 36 "passive", 37 "so" 38 }; 39 40 [Pref="media.peerconnection.enabled", 41 JSImplementation="@mozilla.org/dom/rtcicecandidate;1", 42 Exposed=Window] 43 interface RTCIceCandidate { 44 [Throws] 45 constructor(optional RTCIceCandidateInit candidateInitDict = {}); 46 readonly attribute DOMString candidate; 47 readonly attribute DOMString? sdpMid; 48 readonly attribute unsigned short? sdpMLineIndex; 49 readonly attribute DOMString? foundation; 50 readonly attribute RTCIceComponent? component; 51 readonly attribute unsigned long? priority; 52 readonly attribute DOMString? address; 53 readonly attribute RTCIceProtocol? protocol; 54 readonly attribute unsigned short? port; 55 readonly attribute RTCIceCandidateType? type; 56 readonly attribute RTCIceTcpCandidateType? tcpType; 57 readonly attribute DOMString? relatedAddress; 58 readonly attribute unsigned short? relatedPort; 59 readonly attribute DOMString? usernameFragment; 60 // TODO: add remaining members relayProtocol and url (bug 1886013) 61 // readonly attribute RTCIceServerTransportProtocol? relayProtocol; 62 // readonly attribute DOMString? url; 63 RTCIceCandidateInit toJSON(); 64 };