OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // Promise<RTCSessionDescription> createAnswer(optional RTCAnswerOptions opt
ions); | 75 // Promise<RTCSessionDescription> createAnswer(optional RTCAnswerOptions opt
ions); |
76 // Promise<void> setLocalDescription(RTCSessionDescription description); | 76 // Promise<void> setLocalDescription(RTCSessionDescription description); |
77 readonly attribute RTCSessionDescription? localDescription; | 77 readonly attribute RTCSessionDescription? localDescription; |
78 // readonly attribute RTCSessionDescription? currentLocalDescription; | 78 // readonly attribute RTCSessionDescription? currentLocalDescription; |
79 // readonly attribute RTCSessionDescription? pendingLocalDescription; | 79 // readonly attribute RTCSessionDescription? pendingLocalDescription; |
80 // Promise<void> setRemoteDescription(RTCSessionDescription description); | 80 // Promise<void> setRemoteDescription(RTCSessionDescription description); |
81 readonly attribute RTCSessionDescription? remoteDescription; | 81 readonly attribute RTCSessionDescription? remoteDescription; |
82 // readonly attribute RTCSessionDescription? currentRemoteDescription; | 82 // readonly attribute RTCSessionDescription? currentRemoteDescription; |
83 // readonly attribute RTCSessionDescription? pendingRemoteDescription; | 83 // readonly attribute RTCSessionDescription? pendingRemoteDescription; |
84 // TODO(guidou): addIceCandidate() should return a Promise. | 84 // TODO(guidou): addIceCandidate() should return a Promise. |
85 [RaisesException] void addIceCandidate(RTCIceCandidate candidate); | 85 [RaisesException, LegacyInterfaceTypeChecking] void addIceCandidate(RTCIceCa
ndidate candidate); |
86 readonly attribute RTCSignalingState signalingState; | 86 readonly attribute RTCSignalingState signalingState; |
87 readonly attribute RTCIceGatheringState iceGatheringState; | 87 readonly attribute RTCIceGatheringState iceGatheringState; |
88 readonly attribute RTCIceConnectionState iceConnectionState; | 88 readonly attribute RTCIceConnectionState iceConnectionState; |
89 // readonly attribute boolean? canTrickleIceCandidates; | 89 // readonly attribute boolean? canTrickleIceCandidates; |
90 // RTCConfiguration getConfiguration(); | 90 // RTCConfiguration getConfiguration(); |
91 // void setConfiguration(RTCConfiguration configuration); | 91 // void setConfiguration(RTCConfiguration configuration); |
92 // TODO(guidou): close() should never throw an exception. | 92 // TODO(guidou): close() should never throw an exception. |
93 [RaisesException] void close(); | 93 [RaisesException] void close(); |
94 attribute EventHandler onnegotiationneeded; | 94 attribute EventHandler onnegotiationneeded; |
95 attribute EventHandler onicecandidate; | 95 attribute EventHandler onicecandidate; |
96 attribute EventHandler onsignalingstatechange; | 96 attribute EventHandler onsignalingstatechange; |
97 attribute EventHandler oniceconnectionstatechange; | 97 attribute EventHandler oniceconnectionstatechange; |
98 // attribute EventHandler onicegatheringstatechange; | 98 // attribute EventHandler onicegatheringstatechange; |
99 | 99 |
100 // https://w3c.github.io/webrtc-pc/#legacy-interface-extensions | 100 // https://w3c.github.io/webrtc-pc/#legacy-interface-extensions |
101 // TODO(guidou): The failureCallback argument should be non-optional. | 101 // TODO(guidou): The failureCallback argument should be non-optional. |
102 [RaisesException] void createOffer(RTCSessionDescriptionCallback successCall
back, [Default=Undefined] optional RTCErrorCallback failureCallback, optional Di
ctionary rtcOfferOptions); | 102 [RaisesException] void createOffer(RTCSessionDescriptionCallback successCall
back, [Default=Undefined] optional RTCErrorCallback failureCallback, optional Di
ctionary rtcOfferOptions); |
103 // TODO(guidou): None of the arguments should be optional. | 103 // TODO(guidou): None of the arguments should be optional. |
104 [RaisesException] void setLocalDescription(RTCSessionDescription description
, [Default=Undefined] optional VoidCallback successCallback, [Default=Undefined]
optional RTCErrorCallback failureCallback); | 104 [RaisesException, LegacyInterfaceTypeChecking] void setLocalDescription(RTCS
essionDescription description, [Default=Undefined] optional VoidCallback success
Callback, [Default=Undefined] optional RTCErrorCallback failureCallback); |
105 // TODO(guidou): The failureCallback argument should be non-optional, and | 105 // TODO(guidou): The failureCallback argument should be non-optional, and |
106 // there should be no mediaConstraints argument. | 106 // there should be no mediaConstraints argument. |
107 [RaisesException] void createAnswer(RTCSessionDescriptionCallback successCal
lback, [Default=Undefined] optional RTCErrorCallback failureCallback, optional D
ictionary mediaConstraints); | 107 [RaisesException] void createAnswer(RTCSessionDescriptionCallback successCal
lback, [Default=Undefined] optional RTCErrorCallback failureCallback, optional D
ictionary mediaConstraints); |
108 // TODO(guidou): The successCallback and failureCallback arguments should be | 108 // TODO(guidou): The successCallback and failureCallback arguments should be |
109 // non-optional. | 109 // non-optional. |
110 [RaisesException] void setRemoteDescription(RTCSessionDescription descriptio
n, [Default=Undefined] optional VoidCallback successCallback, [Default=Undefined
] optional RTCErrorCallback failureCallback); | 110 [RaisesException, LegacyInterfaceTypeChecking] void setRemoteDescription(RTC
SessionDescription description, [Default=Undefined] optional VoidCallback succes
sCallback, [Default=Undefined] optional RTCErrorCallback failureCallback); |
111 [RaisesException] void addIceCandidate(RTCIceCandidate candidate, VoidCallba
ck successCallback, RTCErrorCallback failureCallback); | 111 [RaisesException, LegacyInterfaceTypeChecking] void addIceCandidate(RTCIceCa
ndidate candidate, VoidCallback successCallback, RTCErrorCallback failureCallbac
k); |
112 // TODO(guidou): The selector argument should the first (nullable, | 112 // TODO(guidou): The selector argument should the first (nullable, |
113 // non-optional) argument, and there should be a third failureCallback | 113 // non-optional) argument, and there should be a third failureCallback |
114 // argument. | 114 // argument. |
115 void getStats(RTCStatsCallback successCallback, [Default=Undefined] optional
MediaStreamTrack selector); | 115 [LegacyInterfaceTypeChecking] void getStats(RTCStatsCallback successCallback
, [Default=Undefined] optional MediaStreamTrack selector); |
116 | 116 |
117 // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api | 117 // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api |
118 // TODO(guidou): The label argument should have [TreatNullAs=EmptyString] | 118 // TODO(guidou): The label argument should have [TreatNullAs=EmptyString] |
119 // and be non-nullable. | 119 // and be non-nullable. |
120 [RaisesException] RTCDataChannel createDataChannel([TreatUndefinedAs=NullStr
ing] DOMString? label, optional Dictionary options); | 120 [RaisesException] RTCDataChannel createDataChannel([TreatUndefinedAs=NullStr
ing] DOMString? label, optional Dictionary options); |
121 attribute EventHandler ondatachannel; | 121 attribute EventHandler ondatachannel; |
122 | 122 |
123 // Non-standard or removed from the spec: | 123 // Non-standard or removed from the spec: |
124 [RaisesException] void updateIce(optional Dictionary configuration, optional
Dictionary mediaConstraints); | 124 [RaisesException] void updateIce(optional Dictionary configuration, optional
Dictionary mediaConstraints); |
125 sequence<MediaStream> getLocalStreams(); | 125 sequence<MediaStream> getLocalStreams(); |
126 sequence<MediaStream> getRemoteStreams(); | 126 sequence<MediaStream> getRemoteStreams(); |
127 MediaStream getStreamById(DOMString streamId); | 127 MediaStream getStreamById(DOMString streamId); |
128 [TypeChecking=Interface, RaisesException] void addStream(MediaStream? stream
, optional Dictionary mediaConstraints); | 128 [RaisesException] void addStream(MediaStream? stream, optional Dictionary me
diaConstraints); |
129 [TypeChecking=Interface, RaisesException] void removeStream(MediaStream? str
eam); | 129 [RaisesException] void removeStream(MediaStream? stream); |
130 [RaisesException] RTCDTMFSender createDTMFSender(MediaStreamTrack track); | 130 [RaisesException, LegacyInterfaceTypeChecking] RTCDTMFSender createDTMFSende
r(MediaStreamTrack track); |
131 attribute EventHandler onaddstream; | 131 attribute EventHandler onaddstream; |
132 attribute EventHandler onremovestream; | 132 attribute EventHandler onremovestream; |
133 | 133 |
134 // Certificate management | 134 // Certificate management |
135 // http://w3c.github.io/webrtc-pc/#sec.cert-mgmt | 135 // http://w3c.github.io/webrtc-pc/#sec.cert-mgmt |
136 [RuntimeEnabled=RTCCertificate, RaisesException, CallWith=ScriptState] stati
c Promise<RTCCertificate> generateCertificate(AlgorithmIdentifier keygenAlgorith
m); | 136 [RuntimeEnabled=RTCCertificate, RaisesException, CallWith=ScriptState] stati
c Promise<RTCCertificate> generateCertificate(AlgorithmIdentifier keygenAlgorith
m); |
137 }; | 137 }; |
OLD | NEW |