1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://w3c.github.io/webrtc-pc/#dom-rtcicerole
enum RTCIceRole {
"controlling",
"controlled",
};
// https://w3c.github.io/webrtc-pc/#dom-rtcicetransportstate
enum RTCIceTransportState {
"new",
"checking",
"connected",
"completed",
"disconnected",
"failed",
"closed",
};
// https://w3c.github.io/webrtc-pc/#dom-rtcicegatheringstate
enum RTCIceGatheringState {
"new",
"gathering",
"complete"
};
// https://w3c.github.io/webrtc-pc/#rtcicetransport
[
ActiveScriptWrappable,
Exposed=Window,
SecureContext
] interface RTCIceTransport : EventTarget {
// Constructor from https://w3c.github.io/webrtc-ice/#rtcicetransport*
[CallWith=ExecutionContext, Measure] constructor();
// TODO(github.com/w3c/webrtc-ice/issues/4): role is non-null in the
// WebRTC-PC specification.
[Measure] readonly attribute RTCIceRole? role;
[Measure] readonly attribute RTCIceTransportState state;
[Measure] readonly attribute RTCIceGatheringState gatheringState;
[Measure] sequence<RTCIceCandidate> getLocalCandidates();
[Measure] sequence<RTCIceCandidate> getRemoteCandidates();
[Measure] RTCIceCandidatePair? getSelectedCandidatePair();
[Measure] RTCIceParameters? getLocalParameters();
[Measure] RTCIceParameters? getRemoteParameters();
attribute EventHandler onstatechange;
attribute EventHandler ongatheringstatechange;
attribute EventHandler onselectedcandidatepairchange;
// The following is defined in the WebRTC-ICE extension specification.
// https://w3c.github.io/webrtc-ice/#rtcicetransport*
[RuntimeEnabled=RTCIceTransportExtension, RaisesException] void gather(RTCIceGatherOptions options);
[RuntimeEnabled=RTCIceTransportExtension, RaisesException] void start(RTCIceParameters remoteParameters, optional RTCIceRole role = "controlled");
[RuntimeEnabled=RTCIceTransportExtension] void stop();
[RuntimeEnabled=RTCIceTransportExtension, RaisesException] void addRemoteCandidate(RTCIceCandidate remoteCandidate);
// TODO(crbug.com/864871): Implement onerror.
[RuntimeEnabled=RTCIceTransportExtension] attribute EventHandler onicecandidate;
};
|