AX: VoiceOver does not announce the aria-checked state for ARIA treeitem
[WebKit-https.git] / Source / WebCore / Modules / mediastream / RTCStatsReport.idl
1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  * Copyright (C) 2017 Apple Inc. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1.  Redistributions of source code must retain the above copyright
9  *     notice, this list of conditions and the following disclaimer.
10  * 2.  Redistributions in binary form must reproduce the above copyright
11  *     notice, this list of conditions and the following disclaimer in the
12  *     documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
15  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17  * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
18  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 [
27     Conditional=WEB_RTC,
28     EnabledAtRuntime=PeerConnection,
29     ImplementationLacksVTable,
30     Exposed=Window
31 ] interface RTCStatsReport {
32     readonly maplike<DOMString, object>;
33 };
34
35 enum RTCStatsType {
36     "candidate-pair",
37     "certificate",
38     "codec",
39     "data-channel",
40     "inbound-rtp",
41     "local-candidate",
42     "media-source",
43     "outbound-rtp",
44     "peer-connection",
45     "remote-candidate",
46     "remote-inbound-rtp",
47     "track",
48     "transport"
49 };
50
51 typedef double DOMHighResTimeStamp;
52
53 dictionary RTCStats {
54     DOMHighResTimeStamp timestamp;
55     RTCStatsType type;
56     DOMString id;
57
58 };
59
60 [ JSGenerateToJSObject ]
61 dictionary RTCRtpStreamStats : RTCStats {
62     required unsigned long ssrc;
63     required DOMString kind;
64     // We should obsolete this field
65     required DOMString mediaType;
66     DOMString transportId;
67     DOMString codecId;
68 };
69
70 [ JSGenerateToJSObject ]
71 dictionary RTCReceivedRtpStreamStats : RTCRtpStreamStats {
72     unsigned long long packetsReceived;
73     long long packetsLost;
74     double jitter;
75     unsigned long long packetsDiscarded;
76     unsigned long long packetsRepaired;
77     unsigned long long burstPacketsLost;
78     unsigned long long burstPacketsDiscarded;
79     unsigned long burstLossCount;
80     unsigned long burstDiscardCount;
81     double burstLossRate;
82     double burstDiscardRate;
83     double gapLossRate;
84     double gapDiscardRate;
85     unsigned long framesDropped;
86     unsigned long partialFramesLost;
87     unsigned long fullFramesLost;
88 };
89
90 [ JSGenerateToJSObject ]
91 dictionary RTCInboundRtpStreamStats : RTCReceivedRtpStreamStats {
92     // required DOMString receiverId;
93     DOMString remoteId;
94     unsigned long framesDecoded;
95     unsigned long keyFramesDecoded;
96     unsigned long frameWidth;
97     unsigned long frameHeight;
98     unsigned long frameBitDepth;
99     double framesPerSecond;
100     unsigned long long qpSum;
101     double totalDecodeTime;
102     double totalInterFrameDelay;
103     double totalSquaredInterFrameDelay;
104     boolean voiceActivityFlag;
105     DOMHighResTimeStamp lastPacketReceivedTimestamp;
106     double averageRtcpInterval;
107     unsigned long long headerBytesReceived;
108     unsigned long long fecPacketsReceived;
109     unsigned long long fecPacketsDiscarded;
110     unsigned long long bytesReceived;
111     unsigned long long packetsFailedDecryption;
112     unsigned long long packetsDuplicated;
113     // record<USVString, unsigned long long> perDscpPacketsReceived;
114     unsigned long nackCount;
115     unsigned long firCount;
116     unsigned long pliCount;
117     unsigned long sliCount;
118     DOMHighResTimeStamp estimatedPlayoutTimestamp;
119     double jitterBufferDelay;
120     unsigned long long jitterBufferEmittedCount;
121     unsigned long long totalSamplesReceived;
122     unsigned long long samplesDecodedWithSilk;
123     unsigned long long samplesDecodedWithCelt;
124     unsigned long long concealedSamples;
125     unsigned long long silentConcealedSamples;
126     unsigned long long concealmentEvents;
127     unsigned long long insertedSamplesForDeceleration;
128     unsigned long long removedSamplesForAcceleration;
129     double audioLevel;
130     double totalAudioEnergy;
131     double totalSamplesDuration;
132     unsigned long framesReceived;
133     // DOMString decoderImplementation;
134
135     // To be removed as obsolete.
136     DOMString trackId;
137 };
138
139 [ JSGenerateToJSObject ]
140 dictionary RTCRemoteInboundRtpStreamStats : RTCReceivedRtpStreamStats {
141     DOMString localId;
142     double roundTripTime;
143     double totalRoundTripTime;
144     double fractionLost;
145     unsigned long long reportsReceived;
146     unsigned long long roundTripTimeMeasurements;
147 };
148
149 [ JSGenerateToJSObject ]
150 dictionary RTCSentRtpStreamStats : RTCRtpStreamStats {
151     unsigned long packetsSent;
152     unsigned long long bytesSent;
153 };
154
155 [ JSGenerateToJSObject ]
156 dictionary RTCOutboundRtpStreamStats : RTCSentRtpStreamStats {
157     unsigned long rtxSsrc;
158     DOMString mediaSourceId;
159     DOMString senderId;
160     DOMString remoteId;
161     DOMString rid;
162     DOMHighResTimeStamp lastPacketSentTimestamp;
163     unsigned long long headerBytesSent;
164     unsigned long packetsDiscardedOnSend;
165     unsigned long long bytesDiscardedOnSend;
166     unsigned long fecPacketsSent;
167     unsigned long long retransmittedPacketsSent;
168     unsigned long long retransmittedBytesSent;
169     double targetBitrate;
170     unsigned long long totalEncodedBytesTarget;
171     unsigned long frameWidth;
172     unsigned long frameHeight;
173     unsigned long frameBitDepth;
174     double framesPerSecond;
175     unsigned long framesSent;
176     unsigned long hugeFramesSent;
177     unsigned long framesEncoded;
178     unsigned long keyFramesEncoded;
179     unsigned long framesDiscardedOnSend;
180     unsigned long long qpSum;
181     unsigned long long totalSamplesSent;
182     unsigned long long samplesEncodedWithSilk;
183     unsigned long long samplesEncodedWithCelt;
184     boolean voiceActivityFlag;
185     double totalEncodeTime;
186     double totalPacketSendDelay;
187     double averageRtcpInterval;
188     // RTCQualityLimitationReason qualityLimitationReason;
189     // record<DOMString, double> qualityLimitationDurations;
190     unsigned long qualityLimitationResolutionChanges;
191     // record<USVString, unsigned long long> perDscpPacketsSent;
192     unsigned long nackCount;
193     unsigned long firCount;
194     unsigned long pliCount;
195     unsigned long sliCount;
196     // DOMString encoderImplementation;
197
198     // To be removed as obsolete.
199     DOMString trackId;
200 };
201
202 [ JSGenerateToJSObject ]
203 dictionary RTCMediaStreamTrackStats : RTCStats {
204     DOMString trackIdentifier;
205     boolean remoteSource;
206     boolean ended;
207     boolean detached;
208     // FIXME: Add sequence<DOMString> ssrcIds;
209     unsigned long frameWidth;
210     unsigned long frameHeight;
211     double framesPerSecond;
212     unsigned long framesSent;
213     unsigned long framesReceived;
214     unsigned long framesDecoded;
215     unsigned long framesDropped;
216     unsigned long framesCorrupted;
217     unsigned long partialFramesLost;
218     unsigned long fullFramesLost;
219     double audioLevel;
220     double echoReturnLoss;
221     double echoReturnLossEnhancement;
222
223     // FIXME: Introduce RTCVideoReceiverStats
224     unsigned long freezeCount;
225     unsigned long pauseCount;
226     double totalFreezesDuration;
227     double totalPausesDuration;
228     double totalFramesDuration;
229     double sumOfSquaredFramesDuration;
230     // FIXME: Introduce RTCAudioReceiverStats
231     unsigned long long jitterBufferFlushes;
232 };
233
234 [ JSGenerateToJSObject ]
235 dictionary RTCDataChannelStats : RTCStats {
236     DOMString label;
237     DOMString protocol;
238     long datachannelid;
239     // FIXME: Switch state to RTCDataChannelState
240     DOMString state;
241     unsigned long messagesSent;
242     unsigned long long bytesSent;
243     unsigned long messagesReceived;
244     unsigned long long bytesReceived;
245 };
246
247 enum RTCStatsIceCandidatePairState {
248     "frozen",
249     "waiting",
250     "inprogress",
251     "failed",
252     "succeeded",
253     "cancelled"
254 };
255
256 [ JSGenerateToJSObject ]
257 dictionary RTCIceCandidatePairStats : RTCStats {
258     DOMString transportId;
259     DOMString localCandidateId;
260     DOMString remoteCandidateId;
261     RTCStatsIceCandidatePairState state;
262     unsigned long long priority;
263     boolean nominated;
264     boolean writable;
265     boolean readable;
266     unsigned long long bytesSent;
267     unsigned long long bytesReceived;
268     double totalRoundTripTime;
269     double currentRoundTripTime;
270     double availableOutgoingBitrate;
271     double availableIncomingBitrate;
272     unsigned long long requestsReceived;
273     unsigned long long requestsSent;
274     unsigned long long responsesReceived;
275     unsigned long long responsesSent;
276     // FIXME: Expose other fields once libwebrtc support them.
277 };
278
279 [ JSGenerateToJSObject ]
280 dictionary RTCIceCandidateStats : RTCStats {
281     DOMString transportId;
282     // FIXME: decide whether to expose networkType
283     // FIXME: Expose relayProtocol
284     DOMString address;
285     long port;
286     DOMString protocol;
287     RTCIceCandidateType candidateType;
288     long priority;
289     DOMString url;
290     boolean deleted = false;
291 };
292
293 [ JSGenerateToJSObject ]
294 dictionary RTCCertificateStats : RTCStats {
295     DOMString fingerprint;
296     DOMString fingerprintAlgorithm;
297     DOMString base64Certificate;
298     DOMString issuerCertificateId;
299 };
300
301 enum RTCCodecType {
302     "encode",
303     "decode"
304 };
305
306 [ JSGenerateToJSObject ]
307 dictionary RTCCodecStats : RTCStats {
308     unsigned long payloadType;
309     RTCCodecType codecType;
310     DOMString transportId;
311     DOMString mimeType;
312     unsigned long clockRate;
313     unsigned long channels;
314     DOMString sdpFmtpLine;
315 };
316
317 [ JSGenerateToJSObject ]
318 dictionary RTCTransportStats : RTCStats {
319     // FIXME 169662: Support more fields.
320     // unsigned long packetsSent;
321     // unsigned long packetsReceived;
322     unsigned long long bytesSent;
323     unsigned long long bytesReceived;
324     DOMString rtcpTransportStatsId;
325     // RTCIceRole iceRole;
326     // DOMString iceLocalUsernameFragment;
327     required DOMString dtlsState;
328     // RTCIceTransportState iceState;
329     DOMString selectedCandidatePairId;
330     DOMString localCertificateId;
331     DOMString remoteCertificateId;
332     DOMString tlsVersion;
333     DOMString dtlsCipher;
334     DOMString srtpCipher;
335     // DOMString tlsGroup;
336     // unsigned long selectedCandidatePairChanges;
337 };
338
339 [ JSGenerateToJSObject ]
340 dictionary RTCPeerConnectionStats : RTCStats {
341     // FIXME 169662: Support more fields.
342     unsigned long dataChannelsOpened;
343     unsigned long dataChannelsClosed;
344     // unsigned long dataChannelsRequested;
345     // unsigned long dataChannelsAccepted;
346 };
347
348 [ JSGenerateToJSObject ]
349 dictionary RTCMediaSourceStats : RTCStats {
350     required DOMString  trackIdentifier;
351     required DOMString  kind;
352     boolean relayedSource;
353 };
354
355 dictionary RTCAudioSourceStats : RTCMediaSourceStats {
356     double audioLevel;
357     double totalAudioEnergy;
358     double totalSamplesDuration;
359     double echoReturnLoss;
360     double echoReturnLossEnhancement;
361 };
362
363 dictionary RTCVideoSourceStats : RTCMediaSourceStats {
364     unsigned long width;
365     unsigned long height;
366     unsigned long bitDepth;
367     unsigned long frames;
368     double framesPerSecond;
369 };
370
371 // FIXME 169662: missing RTCMediaStreamStats