Victor Porof | 6e09692 | 2022-06-10 13:01:05 +0000 | [diff] [blame] | 1 | // GENERATED CONTENT - DO NOT EDIT |
| 2 | // Content was automatically extracted by Reffy into webref |
| 3 | // (https://github.com/w3c/webref) |
| 4 | // Source: WebRTC 1.0: Real-Time Communication Between Browsers (https://w3c.github.io/webrtc-pc/) |
| 5 | |
| 6 | dictionary RTCConfiguration { |
| 7 | sequence<RTCIceServer> iceServers = []; |
| 8 | RTCIceTransportPolicy iceTransportPolicy = "all"; |
| 9 | RTCBundlePolicy bundlePolicy = "balanced"; |
| 10 | RTCRtcpMuxPolicy rtcpMuxPolicy = "require"; |
| 11 | sequence<RTCCertificate> certificates = []; |
| 12 | [EnforceRange] octet iceCandidatePoolSize = 0; |
| 13 | }; |
| 14 | |
| 15 | enum RTCIceCredentialType { |
| 16 | "password" |
| 17 | }; |
| 18 | |
| 19 | dictionary RTCIceServer { |
| 20 | required (DOMString or sequence<DOMString>) urls; |
| 21 | DOMString username; |
| 22 | DOMString credential; |
| 23 | RTCIceCredentialType credentialType = "password"; |
| 24 | }; |
| 25 | |
| 26 | enum RTCIceTransportPolicy { |
| 27 | "relay", |
| 28 | "all" |
| 29 | }; |
| 30 | |
| 31 | enum RTCBundlePolicy { |
| 32 | "balanced", |
| 33 | "max-compat", |
| 34 | "max-bundle" |
| 35 | }; |
| 36 | |
| 37 | enum RTCRtcpMuxPolicy { |
| 38 | "require" |
| 39 | }; |
| 40 | |
| 41 | dictionary RTCOfferAnswerOptions {}; |
| 42 | |
| 43 | dictionary RTCOfferOptions : RTCOfferAnswerOptions { |
| 44 | boolean iceRestart = false; |
| 45 | }; |
| 46 | |
| 47 | dictionary RTCAnswerOptions : RTCOfferAnswerOptions {}; |
| 48 | |
| 49 | enum RTCSignalingState { |
| 50 | "stable", |
| 51 | "have-local-offer", |
| 52 | "have-remote-offer", |
| 53 | "have-local-pranswer", |
| 54 | "have-remote-pranswer", |
| 55 | "closed" |
| 56 | }; |
| 57 | |
| 58 | enum RTCIceGatheringState { |
| 59 | "new", |
| 60 | "gathering", |
| 61 | "complete" |
| 62 | }; |
| 63 | |
| 64 | enum RTCPeerConnectionState { |
| 65 | "closed", |
| 66 | "failed", |
| 67 | "disconnected", |
| 68 | "new", |
| 69 | "connecting", |
| 70 | "connected" |
| 71 | }; |
| 72 | |
| 73 | enum RTCIceConnectionState { |
| 74 | "closed", |
| 75 | "failed", |
| 76 | "disconnected", |
| 77 | "new", |
| 78 | "checking", |
| 79 | "completed", |
| 80 | "connected" |
| 81 | }; |
| 82 | |
| 83 | [Exposed=Window] |
| 84 | interface RTCPeerConnection : EventTarget { |
| 85 | constructor(optional RTCConfiguration configuration = {}); |
| 86 | Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options = {}); |
| 87 | Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options = {}); |
| 88 | Promise<undefined> setLocalDescription(optional RTCLocalSessionDescriptionInit description = {}); |
| 89 | readonly attribute RTCSessionDescription? localDescription; |
| 90 | readonly attribute RTCSessionDescription? currentLocalDescription; |
| 91 | readonly attribute RTCSessionDescription? pendingLocalDescription; |
| 92 | Promise<undefined> setRemoteDescription(RTCSessionDescriptionInit description); |
| 93 | readonly attribute RTCSessionDescription? remoteDescription; |
| 94 | readonly attribute RTCSessionDescription? currentRemoteDescription; |
| 95 | readonly attribute RTCSessionDescription? pendingRemoteDescription; |
| 96 | Promise<undefined> addIceCandidate(optional RTCIceCandidateInit candidate = {}); |
| 97 | readonly attribute RTCSignalingState signalingState; |
| 98 | readonly attribute RTCIceGatheringState iceGatheringState; |
| 99 | readonly attribute RTCIceConnectionState iceConnectionState; |
| 100 | readonly attribute RTCPeerConnectionState connectionState; |
| 101 | readonly attribute boolean? canTrickleIceCandidates; |
| 102 | undefined restartIce(); |
| 103 | RTCConfiguration getConfiguration(); |
| 104 | undefined setConfiguration(optional RTCConfiguration configuration = {}); |
| 105 | undefined close(); |
| 106 | attribute EventHandler onnegotiationneeded; |
| 107 | attribute EventHandler onicecandidate; |
| 108 | attribute EventHandler onicecandidateerror; |
| 109 | attribute EventHandler onsignalingstatechange; |
| 110 | attribute EventHandler oniceconnectionstatechange; |
| 111 | attribute EventHandler onicegatheringstatechange; |
| 112 | attribute EventHandler onconnectionstatechange; |
| 113 | |
| 114 | // Legacy Interface Extensions |
| 115 | // Supporting the methods in this section is optional. |
| 116 | // If these methods are supported |
| 117 | // they must be implemented as defined |
| 118 | // in section "Legacy Interface Extensions" |
| 119 | Promise<undefined> createOffer(RTCSessionDescriptionCallback successCallback, |
| 120 | RTCPeerConnectionErrorCallback failureCallback, |
| 121 | optional RTCOfferOptions options = {}); |
| 122 | Promise<undefined> setLocalDescription(RTCLocalSessionDescriptionInit description, |
| 123 | VoidFunction successCallback, |
| 124 | RTCPeerConnectionErrorCallback failureCallback); |
| 125 | Promise<undefined> createAnswer(RTCSessionDescriptionCallback successCallback, |
| 126 | RTCPeerConnectionErrorCallback failureCallback); |
| 127 | Promise<undefined> setRemoteDescription(RTCSessionDescriptionInit description, |
| 128 | VoidFunction successCallback, |
| 129 | RTCPeerConnectionErrorCallback failureCallback); |
| 130 | Promise<undefined> addIceCandidate(RTCIceCandidateInit candidate, |
| 131 | VoidFunction successCallback, |
| 132 | RTCPeerConnectionErrorCallback failureCallback); |
| 133 | }; |
| 134 | |
| 135 | callback RTCPeerConnectionErrorCallback = undefined (DOMException error); |
| 136 | |
| 137 | callback RTCSessionDescriptionCallback = undefined (RTCSessionDescriptionInit description); |
| 138 | |
| 139 | partial dictionary RTCOfferOptions { |
| 140 | boolean offerToReceiveAudio; |
| 141 | boolean offerToReceiveVideo; |
| 142 | }; |
| 143 | |
| 144 | enum RTCSdpType { |
| 145 | "offer", |
| 146 | "pranswer", |
| 147 | "answer", |
| 148 | "rollback" |
| 149 | }; |
| 150 | |
| 151 | [Exposed=Window] |
| 152 | interface RTCSessionDescription { |
| 153 | constructor(RTCSessionDescriptionInit descriptionInitDict); |
| 154 | readonly attribute RTCSdpType type; |
| 155 | readonly attribute DOMString sdp; |
| 156 | [Default] object toJSON(); |
| 157 | }; |
| 158 | |
| 159 | dictionary RTCSessionDescriptionInit { |
| 160 | required RTCSdpType type; |
| 161 | DOMString sdp = ""; |
| 162 | }; |
| 163 | |
| 164 | dictionary RTCLocalSessionDescriptionInit { |
| 165 | RTCSdpType type; |
| 166 | DOMString sdp = ""; |
| 167 | }; |
| 168 | |
| 169 | [Exposed=Window] |
| 170 | interface RTCIceCandidate { |
| 171 | constructor(optional RTCIceCandidateInit candidateInitDict = {}); |
| 172 | readonly attribute DOMString candidate; |
| 173 | readonly attribute DOMString? sdpMid; |
| 174 | readonly attribute unsigned short? sdpMLineIndex; |
| 175 | readonly attribute DOMString? foundation; |
| 176 | readonly attribute RTCIceComponent? component; |
| 177 | readonly attribute unsigned long? priority; |
| 178 | readonly attribute DOMString? address; |
| 179 | readonly attribute RTCIceProtocol? protocol; |
| 180 | readonly attribute unsigned short? port; |
| 181 | readonly attribute RTCIceCandidateType? type; |
| 182 | readonly attribute RTCIceTcpCandidateType? tcpType; |
| 183 | readonly attribute DOMString? relatedAddress; |
| 184 | readonly attribute unsigned short? relatedPort; |
| 185 | readonly attribute DOMString? usernameFragment; |
| 186 | RTCIceCandidateInit toJSON(); |
| 187 | }; |
| 188 | |
| 189 | dictionary RTCIceCandidateInit { |
| 190 | DOMString candidate = ""; |
| 191 | DOMString? sdpMid = null; |
| 192 | unsigned short? sdpMLineIndex = null; |
| 193 | DOMString? usernameFragment = null; |
| 194 | }; |
| 195 | |
| 196 | enum RTCIceProtocol { |
| 197 | "udp", |
| 198 | "tcp" |
| 199 | }; |
| 200 | |
| 201 | enum RTCIceTcpCandidateType { |
| 202 | "active", |
| 203 | "passive", |
| 204 | "so" |
| 205 | }; |
| 206 | |
| 207 | enum RTCIceCandidateType { |
| 208 | "host", |
| 209 | "srflx", |
| 210 | "prflx", |
| 211 | "relay" |
| 212 | }; |
| 213 | |
| 214 | [Exposed=Window] |
| 215 | interface RTCPeerConnectionIceEvent : Event { |
| 216 | constructor(DOMString type, optional RTCPeerConnectionIceEventInit eventInitDict = {}); |
| 217 | readonly attribute RTCIceCandidate? candidate; |
| 218 | readonly attribute DOMString? url; |
| 219 | }; |
| 220 | |
| 221 | dictionary RTCPeerConnectionIceEventInit : EventInit { |
| 222 | RTCIceCandidate? candidate; |
| 223 | DOMString? url; |
| 224 | }; |
| 225 | |
| 226 | [Exposed=Window] |
| 227 | interface RTCPeerConnectionIceErrorEvent : Event { |
| 228 | constructor(DOMString type, RTCPeerConnectionIceErrorEventInit eventInitDict); |
| 229 | readonly attribute DOMString? address; |
| 230 | readonly attribute unsigned short? port; |
| 231 | readonly attribute DOMString url; |
| 232 | readonly attribute unsigned short errorCode; |
| 233 | readonly attribute USVString errorText; |
| 234 | }; |
| 235 | |
| 236 | dictionary RTCPeerConnectionIceErrorEventInit : EventInit { |
| 237 | DOMString? address; |
| 238 | unsigned short? port; |
| 239 | DOMString url; |
| 240 | required unsigned short errorCode; |
| 241 | USVString errorText; |
| 242 | }; |
| 243 | |
| 244 | partial interface RTCPeerConnection { |
| 245 | static Promise<RTCCertificate> |
| 246 | generateCertificate(AlgorithmIdentifier keygenAlgorithm); |
| 247 | }; |
| 248 | |
| 249 | dictionary RTCCertificateExpiration { |
| 250 | [EnforceRange] unsigned long long expires; |
| 251 | }; |
| 252 | |
| 253 | [Exposed=Window, Serializable] |
| 254 | interface RTCCertificate { |
| 255 | readonly attribute EpochTimeStamp expires; |
| 256 | sequence<RTCDtlsFingerprint> getFingerprints(); |
| 257 | }; |
| 258 | |
| 259 | partial interface RTCPeerConnection { |
| 260 | sequence<RTCRtpSender> getSenders(); |
| 261 | sequence<RTCRtpReceiver> getReceivers(); |
| 262 | sequence<RTCRtpTransceiver> getTransceivers(); |
| 263 | RTCRtpSender addTrack(MediaStreamTrack track, MediaStream... streams); |
| 264 | undefined removeTrack(RTCRtpSender sender); |
| 265 | RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) trackOrKind, |
| 266 | optional RTCRtpTransceiverInit init = {}); |
| 267 | attribute EventHandler ontrack; |
| 268 | }; |
| 269 | |
| 270 | dictionary RTCRtpTransceiverInit { |
| 271 | RTCRtpTransceiverDirection direction = "sendrecv"; |
| 272 | sequence<MediaStream> streams = []; |
| 273 | sequence<RTCRtpEncodingParameters> sendEncodings = []; |
| 274 | }; |
| 275 | |
| 276 | enum RTCRtpTransceiverDirection { |
| 277 | "sendrecv", |
| 278 | "sendonly", |
| 279 | "recvonly", |
| 280 | "inactive", |
| 281 | "stopped" |
| 282 | }; |
| 283 | |
| 284 | [Exposed=Window] |
| 285 | interface RTCRtpSender { |
| 286 | readonly attribute MediaStreamTrack? track; |
| 287 | readonly attribute RTCDtlsTransport? transport; |
| 288 | static RTCRtpCapabilities? getCapabilities(DOMString kind); |
| 289 | Promise<undefined> setParameters(RTCRtpSendParameters parameters); |
| 290 | RTCRtpSendParameters getParameters(); |
| 291 | Promise<undefined> replaceTrack(MediaStreamTrack? withTrack); |
| 292 | undefined setStreams(MediaStream... streams); |
| 293 | Promise<RTCStatsReport> getStats(); |
| 294 | }; |
| 295 | |
| 296 | dictionary RTCRtpParameters { |
| 297 | required sequence<RTCRtpHeaderExtensionParameters> headerExtensions; |
| 298 | required RTCRtcpParameters rtcp; |
| 299 | required sequence<RTCRtpCodecParameters> codecs; |
| 300 | }; |
| 301 | |
| 302 | dictionary RTCRtpSendParameters : RTCRtpParameters { |
| 303 | required DOMString transactionId; |
| 304 | required sequence<RTCRtpEncodingParameters> encodings; |
| 305 | }; |
| 306 | |
| 307 | dictionary RTCRtpReceiveParameters : RTCRtpParameters { |
| 308 | }; |
| 309 | |
| 310 | dictionary RTCRtpCodingParameters { |
| 311 | DOMString rid; |
| 312 | }; |
| 313 | |
| 314 | dictionary RTCRtpDecodingParameters : RTCRtpCodingParameters {}; |
| 315 | |
| 316 | dictionary RTCRtpEncodingParameters : RTCRtpCodingParameters { |
| 317 | boolean active = true; |
| 318 | unsigned long maxBitrate; |
| 319 | double scaleResolutionDownBy; |
| 320 | }; |
| 321 | |
| 322 | dictionary RTCRtcpParameters { |
| 323 | DOMString cname; |
| 324 | boolean reducedSize; |
| 325 | }; |
| 326 | |
| 327 | dictionary RTCRtpHeaderExtensionParameters { |
| 328 | required DOMString uri; |
| 329 | required unsigned short id; |
| 330 | boolean encrypted = false; |
| 331 | }; |
| 332 | |
| 333 | dictionary RTCRtpCodecParameters { |
| 334 | required octet payloadType; |
| 335 | required DOMString mimeType; |
| 336 | required unsigned long clockRate; |
| 337 | unsigned short channels; |
| 338 | DOMString sdpFmtpLine; |
| 339 | }; |
| 340 | |
| 341 | dictionary RTCRtpCapabilities { |
| 342 | required sequence<RTCRtpCodecCapability> codecs; |
| 343 | required sequence<RTCRtpHeaderExtensionCapability> headerExtensions; |
| 344 | }; |
| 345 | |
| 346 | dictionary RTCRtpCodecCapability { |
| 347 | required DOMString mimeType; |
| 348 | required unsigned long clockRate; |
| 349 | unsigned short channels; |
| 350 | DOMString sdpFmtpLine; |
| 351 | }; |
| 352 | |
| 353 | dictionary RTCRtpHeaderExtensionCapability { |
| 354 | DOMString uri; |
| 355 | }; |
| 356 | |
| 357 | [Exposed=Window] |
| 358 | interface RTCRtpReceiver { |
| 359 | readonly attribute MediaStreamTrack track; |
| 360 | readonly attribute RTCDtlsTransport? transport; |
| 361 | static RTCRtpCapabilities? getCapabilities(DOMString kind); |
| 362 | RTCRtpReceiveParameters getParameters(); |
| 363 | sequence<RTCRtpContributingSource> getContributingSources(); |
| 364 | sequence<RTCRtpSynchronizationSource> getSynchronizationSources(); |
| 365 | Promise<RTCStatsReport> getStats(); |
| 366 | }; |
| 367 | |
| 368 | dictionary RTCRtpContributingSource { |
| 369 | required DOMHighResTimeStamp timestamp; |
| 370 | required unsigned long source; |
| 371 | double audioLevel; |
| 372 | required unsigned long rtpTimestamp; |
| 373 | }; |
| 374 | |
| 375 | dictionary RTCRtpSynchronizationSource : RTCRtpContributingSource {}; |
| 376 | |
| 377 | [Exposed=Window] |
| 378 | interface RTCRtpTransceiver { |
| 379 | readonly attribute DOMString? mid; |
| 380 | [SameObject] readonly attribute RTCRtpSender sender; |
| 381 | [SameObject] readonly attribute RTCRtpReceiver receiver; |
| 382 | attribute RTCRtpTransceiverDirection direction; |
| 383 | readonly attribute RTCRtpTransceiverDirection? currentDirection; |
| 384 | undefined stop(); |
| 385 | undefined setCodecPreferences(sequence<RTCRtpCodecCapability> codecs); |
| 386 | }; |
| 387 | |
| 388 | [Exposed=Window] |
| 389 | interface RTCDtlsTransport : EventTarget { |
| 390 | [SameObject] readonly attribute RTCIceTransport iceTransport; |
| 391 | readonly attribute RTCDtlsTransportState state; |
| 392 | sequence<ArrayBuffer> getRemoteCertificates(); |
| 393 | attribute EventHandler onstatechange; |
| 394 | attribute EventHandler onerror; |
| 395 | }; |
| 396 | |
| 397 | enum RTCDtlsTransportState { |
| 398 | "new", |
| 399 | "connecting", |
| 400 | "connected", |
| 401 | "closed", |
| 402 | "failed" |
| 403 | }; |
| 404 | |
| 405 | dictionary RTCDtlsFingerprint { |
| 406 | DOMString algorithm; |
| 407 | DOMString value; |
| 408 | }; |
| 409 | |
| 410 | [Exposed=Window] |
| 411 | interface RTCIceTransport : EventTarget { |
| 412 | readonly attribute RTCIceRole role; |
| 413 | readonly attribute RTCIceComponent component; |
| 414 | readonly attribute RTCIceTransportState state; |
| 415 | readonly attribute RTCIceGathererState gatheringState; |
| 416 | sequence<RTCIceCandidate> getLocalCandidates(); |
| 417 | sequence<RTCIceCandidate> getRemoteCandidates(); |
| 418 | RTCIceCandidatePair? getSelectedCandidatePair(); |
| 419 | RTCIceParameters? getLocalParameters(); |
| 420 | RTCIceParameters? getRemoteParameters(); |
| 421 | attribute EventHandler onstatechange; |
| 422 | attribute EventHandler ongatheringstatechange; |
| 423 | attribute EventHandler onselectedcandidatepairchange; |
| 424 | }; |
| 425 | |
| 426 | dictionary RTCIceParameters { |
| 427 | DOMString usernameFragment; |
| 428 | DOMString password; |
| 429 | }; |
| 430 | |
| 431 | dictionary RTCIceCandidatePair { |
| 432 | RTCIceCandidate local; |
| 433 | RTCIceCandidate remote; |
| 434 | }; |
| 435 | |
| 436 | enum RTCIceGathererState { |
| 437 | "new", |
| 438 | "gathering", |
| 439 | "complete" |
| 440 | }; |
| 441 | |
| 442 | enum RTCIceTransportState { |
| 443 | "new", |
| 444 | "checking", |
| 445 | "connected", |
| 446 | "completed", |
| 447 | "disconnected", |
| 448 | "failed", |
| 449 | "closed" |
| 450 | }; |
| 451 | |
| 452 | enum RTCIceRole { |
| 453 | "unknown", |
| 454 | "controlling", |
| 455 | "controlled" |
| 456 | }; |
| 457 | |
| 458 | enum RTCIceComponent { |
| 459 | "rtp", |
| 460 | "rtcp" |
| 461 | }; |
| 462 | |
| 463 | [Exposed=Window] |
| 464 | interface RTCTrackEvent : Event { |
| 465 | constructor(DOMString type, RTCTrackEventInit eventInitDict); |
| 466 | readonly attribute RTCRtpReceiver receiver; |
| 467 | readonly attribute MediaStreamTrack track; |
| 468 | [SameObject] readonly attribute FrozenArray<MediaStream> streams; |
| 469 | readonly attribute RTCRtpTransceiver transceiver; |
| 470 | }; |
| 471 | |
| 472 | dictionary RTCTrackEventInit : EventInit { |
| 473 | required RTCRtpReceiver receiver; |
| 474 | required MediaStreamTrack track; |
| 475 | sequence<MediaStream> streams = []; |
| 476 | required RTCRtpTransceiver transceiver; |
| 477 | }; |
| 478 | |
| 479 | partial interface RTCPeerConnection { |
| 480 | readonly attribute RTCSctpTransport? sctp; |
| 481 | RTCDataChannel createDataChannel(USVString label, |
| 482 | optional RTCDataChannelInit dataChannelDict = {}); |
| 483 | attribute EventHandler ondatachannel; |
| 484 | }; |
| 485 | |
| 486 | [Exposed=Window] |
| 487 | interface RTCSctpTransport : EventTarget { |
| 488 | readonly attribute RTCDtlsTransport transport; |
| 489 | readonly attribute RTCSctpTransportState state; |
| 490 | readonly attribute unrestricted double maxMessageSize; |
| 491 | readonly attribute unsigned short? maxChannels; |
| 492 | attribute EventHandler onstatechange; |
| 493 | }; |
| 494 | |
| 495 | enum RTCSctpTransportState { |
| 496 | "connecting", |
| 497 | "connected", |
| 498 | "closed" |
| 499 | }; |
| 500 | |
| 501 | [Exposed=Window] |
| 502 | interface RTCDataChannel : EventTarget { |
| 503 | readonly attribute USVString label; |
| 504 | readonly attribute boolean ordered; |
| 505 | readonly attribute unsigned short? maxPacketLifeTime; |
| 506 | readonly attribute unsigned short? maxRetransmits; |
| 507 | readonly attribute USVString protocol; |
| 508 | readonly attribute boolean negotiated; |
| 509 | readonly attribute unsigned short? id; |
| 510 | readonly attribute RTCDataChannelState readyState; |
| 511 | readonly attribute unsigned long bufferedAmount; |
| 512 | [EnforceRange] attribute unsigned long bufferedAmountLowThreshold; |
| 513 | attribute EventHandler onopen; |
| 514 | attribute EventHandler onbufferedamountlow; |
| 515 | attribute EventHandler onerror; |
| 516 | attribute EventHandler onclosing; |
| 517 | attribute EventHandler onclose; |
| 518 | undefined close(); |
| 519 | attribute EventHandler onmessage; |
| 520 | attribute BinaryType binaryType; |
| 521 | undefined send(USVString data); |
| 522 | undefined send(Blob data); |
| 523 | undefined send(ArrayBuffer data); |
| 524 | undefined send(ArrayBufferView data); |
| 525 | }; |
| 526 | |
| 527 | dictionary RTCDataChannelInit { |
| 528 | boolean ordered = true; |
| 529 | [EnforceRange] unsigned short maxPacketLifeTime; |
| 530 | [EnforceRange] unsigned short maxRetransmits; |
| 531 | USVString protocol = ""; |
| 532 | boolean negotiated = false; |
| 533 | [EnforceRange] unsigned short id; |
| 534 | }; |
| 535 | |
| 536 | enum RTCDataChannelState { |
| 537 | "connecting", |
| 538 | "open", |
| 539 | "closing", |
| 540 | "closed" |
| 541 | }; |
| 542 | |
| 543 | [Exposed=Window] |
| 544 | interface RTCDataChannelEvent : Event { |
| 545 | constructor(DOMString type, RTCDataChannelEventInit eventInitDict); |
| 546 | readonly attribute RTCDataChannel channel; |
| 547 | }; |
| 548 | |
| 549 | dictionary RTCDataChannelEventInit : EventInit { |
| 550 | required RTCDataChannel channel; |
| 551 | }; |
| 552 | |
| 553 | partial interface RTCRtpSender { |
| 554 | readonly attribute RTCDTMFSender? dtmf; |
| 555 | }; |
| 556 | |
| 557 | [Exposed=Window] |
| 558 | interface RTCDTMFSender : EventTarget { |
| 559 | undefined insertDTMF(DOMString tones, optional unsigned long duration = 100, optional unsigned long interToneGap = 70); |
| 560 | attribute EventHandler ontonechange; |
| 561 | readonly attribute boolean canInsertDTMF; |
| 562 | readonly attribute DOMString toneBuffer; |
| 563 | }; |
| 564 | |
| 565 | [Exposed=Window] |
| 566 | interface RTCDTMFToneChangeEvent : Event { |
| 567 | constructor(DOMString type, optional RTCDTMFToneChangeEventInit eventInitDict = {}); |
| 568 | readonly attribute DOMString tone; |
| 569 | }; |
| 570 | |
| 571 | dictionary RTCDTMFToneChangeEventInit : EventInit { |
| 572 | DOMString tone = ""; |
| 573 | }; |
| 574 | |
| 575 | partial interface RTCPeerConnection { |
| 576 | Promise<RTCStatsReport> getStats(optional MediaStreamTrack? selector = null); |
| 577 | }; |
| 578 | |
| 579 | [Exposed=Window] |
| 580 | interface RTCStatsReport { |
| 581 | readonly maplike<DOMString, object>; |
| 582 | }; |
| 583 | |
| 584 | dictionary RTCStats { |
| 585 | required DOMHighResTimeStamp timestamp; |
| 586 | required RTCStatsType type; |
| 587 | required DOMString id; |
| 588 | }; |
| 589 | |
| 590 | [Exposed=Window] |
| 591 | interface RTCError : DOMException { |
| 592 | constructor(RTCErrorInit init, optional DOMString message = ""); |
| 593 | readonly attribute RTCErrorDetailType errorDetail; |
| 594 | readonly attribute long? sdpLineNumber; |
| 595 | readonly attribute long? sctpCauseCode; |
| 596 | readonly attribute unsigned long? receivedAlert; |
| 597 | readonly attribute unsigned long? sentAlert; |
| 598 | }; |
| 599 | |
| 600 | dictionary RTCErrorInit { |
| 601 | required RTCErrorDetailType errorDetail; |
| 602 | long sdpLineNumber; |
| 603 | long sctpCauseCode; |
| 604 | unsigned long receivedAlert; |
| 605 | unsigned long sentAlert; |
| 606 | }; |
| 607 | |
| 608 | enum RTCErrorDetailType { |
| 609 | "data-channel-failure", |
| 610 | "dtls-failure", |
| 611 | "fingerprint-failure", |
| 612 | "sctp-failure", |
| 613 | "sdp-syntax-error", |
| 614 | "hardware-encoder-not-available", |
| 615 | "hardware-encoder-error" |
| 616 | }; |
| 617 | |
| 618 | [Exposed=Window] |
| 619 | interface RTCErrorEvent : Event { |
| 620 | constructor(DOMString type, RTCErrorEventInit eventInitDict); |
| 621 | [SameObject] readonly attribute RTCError error; |
| 622 | }; |
| 623 | |
| 624 | dictionary RTCErrorEventInit : EventInit { |
| 625 | required RTCError error; |
| 626 | }; |