UNPKG

google-closure-compiler

Version:

Check, compile, optimize and compress Javascript with Closure-Compiler

2,318 lines (1,816 loc) • 89.4 kB
/* * Copyright 2012 The Closure Compiler Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @fileoverview Definitions for components of the WebRTC browser API. * @see https://www.w3.org/TR/webrtc/ * @see https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-19 * @see https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API * @see https://www.w3.org/TR/mediacapture-streams/ * * @externs * @author bemasc@google.com (Benjamin M. Schwartz) */ /** * @typedef {string} * @see {https://www.w3.org/TR/mediacapture-streams/ * #idl-def-MediaStreamTrackState} * In WebIDL this is an enum with values 'live', 'mute', and 'ended', * but there is no mechanism in Closure for describing a specialization of * the string type. */ var MediaStreamTrackState; /** * @interface */ function SourceInfo() {} /** @const {string} */ SourceInfo.prototype.kind; /** @const {string} */ SourceInfo.prototype.id; /** @const {?string} */ SourceInfo.prototype.label; /** @const {boolean} */ SourceInfo.prototype.facing; /** * @interface * @see https://w3c.github.io/mediacapture-image/#mediasettingsrange-section */ function MediaSettingsRange() {} /** * @const {number} */ MediaSettingsRange.prototype.max; /** * @const {number} */ MediaSettingsRange.prototype.min; /** * @const {number} */ MediaSettingsRange.prototype.step; /** * @interface * @see https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackCapabilities * @see https://w3c.github.io/mediacapture-image/#mediatrackcapabilities-section * @see https://www.w3.org/TR/screen-capture */ function MediaTrackCapabilities() {} /** @type {number} */ MediaTrackCapabilities.prototype.width; /** @type {number} */ MediaTrackCapabilities.prototype.height; /** @type {number} */ MediaTrackCapabilities.prototype.aspectRatio; /** @type {number} */ MediaTrackCapabilities.prototype.frameRate; /** @type {!Array<string>} */ MediaTrackCapabilities.prototype.facingMode; /** @type {!Array<string>} */ MediaTrackCapabilities.prototype.resizeMode; /** @type {number} */ MediaTrackCapabilities.prototype.volume; /** @type {number} */ MediaTrackCapabilities.prototype.sampleRate; /** @type {number} */ MediaTrackCapabilities.prototype.sampleSize; /** @type {!Array<boolean>} */ MediaTrackCapabilities.prototype.echoCancellation; /** @type {number} */ MediaTrackCapabilities.prototype.latency; /** @type {number} */ MediaTrackCapabilities.prototype.channelCount; /** @type {string} */ MediaTrackCapabilities.prototype.deviceId; /** @type {string} */ MediaTrackCapabilities.prototype.groupId; /** @type {!Array<string>} */ MediaTrackCapabilities.prototype.whiteBalanceMode; /** @type {!Array<string>} */ MediaTrackCapabilities.prototype.exposureMode; /** @type {!Array<string>} */ MediaTrackCapabilities.prototype.focusMode; /** @type {!MediaSettingsRange} */ MediaTrackCapabilities.prototype.exposureCompensation; /** @type {!MediaSettingsRange} */ MediaTrackCapabilities.prototype.colorTemperature /** @type {!MediaSettingsRange} */ MediaTrackCapabilities.prototype.iso /** @type {!MediaSettingsRange} */ MediaTrackCapabilities.prototype.brightness /** @type {!MediaSettingsRange} */ MediaTrackCapabilities.prototype.contrast /** @type {!MediaSettingsRange} */ MediaTrackCapabilities.prototype.saturation /** @type {!MediaSettingsRange} */ MediaTrackCapabilities.prototype.sharpness /** @type {!MediaSettingsRange} */ MediaTrackCapabilities.prototype.zoom /** @type {boolean} */ MediaTrackCapabilities.prototype.torch /** @type {string|undefined} */ MediaTrackCapabilities.prototype.displaySurface; /** @type {boolean|undefined} */ MediaTrackCapabilities.prototype.logicalSurface; /** @type {Array<string>} */ MediaTrackCapabilities.prototype.cursor; /** @type {!Array<boolean>|undefined} */ MediaTrackCapabilities.prototype.backgroundBlur; /** * @interface * @see https://www.w3.org/TR/screen-capture * @see https://www.w3.org/TR/screen-capture/#extensions-to-mediatracksettings * @see https://www.w3.org/TR/mediacapture-streams/#media-track-settings * @see https://w3c.github.io/mediacapture-image/#mediatracksettings-section */ function MediaTrackSettings() {} /** @type {number} */ MediaTrackSettings.prototype.width; /** @type {number} */ MediaTrackSettings.prototype.height; /** @type {number} */ MediaTrackSettings.prototype.aspectRatio; /** @type {number} */ MediaTrackSettings.prototype.frameRate; /** @type {string} */ MediaTrackSettings.prototype.facingMode; /** @type {string} */ MediaTrackSettings.prototype.resizeMode; /** @type {string|undefined} */ MediaTrackSettings.prototype.displaySurface; /** @type {boolean|undefined} */ MediaTrackSettings.prototype.logicalSurface; /** @type {string|undefined} */ MediaTrackSettings.prototype.cursor; /** @type {boolean|undefined} */ MediaTrackSettings.prototype.restrictOwnAudio; /** @type {boolean|undefined} */ MediaTrackSettings.prototype.suppressLocalAudioPlayback; /** @type {number} */ MediaTrackSettings.prototype.volume; /** @type {number} */ MediaTrackSettings.prototype.sampleRate; /** @type {number} */ MediaTrackSettings.prototype.sampleSize; /** @type {boolean} */ MediaTrackSettings.prototype.echoCancellation; /** @type {boolean} */ MediaTrackSettings.prototype.autoGainControl; /** @type {boolean} */ MediaTrackSettings.prototype.noiseSuppression; /** @type {number} */ MediaTrackSettings.prototype.latency; /** @type {number} */ MediaTrackSettings.prototype.channelCount; /** @type {string} */ MediaTrackSettings.prototype.deviceId; /** @type {string} */ MediaTrackSettings.prototype.groupId; /** @type {string} */ MediaTrackSettings.prototype.whiteBalanceMode; /** @type {string} */ MediaTrackSettings.prototype.exposureMode; /** @type {string} */ MediaTrackSettings.prototype.focusMode; /** @type {!Array<{x: number, y: number}>} */ MediaTrackSettings.prototype.pointsOfInterest; /** @type {number} */ MediaTrackSettings.prototype.exposureCompensation; /** @type {number} */ MediaTrackSettings.prototype.colorTemperature; /** @type {number} */ MediaTrackSettings.prototype.iso; /** @type {number} */ MediaTrackSettings.prototype.brightness; /** @type {number} */ MediaTrackSettings.prototype.contrast; /** @type {number} */ MediaTrackSettings.prototype.saturation; /** @type {number} */ MediaTrackSettings.prototype.sharpness; /** @type {number} */ MediaTrackSettings.prototype.zoom; /** @type {boolean} */ MediaTrackSettings.prototype.torch; /** @type {boolean|undefined} */ MediaTrackSettings.prototype.backgroundBlur; /** * @interface * @see https://w3c.github.io/mediacapture-main/#media-track-supported-constraints * @see https://w3c.github.io/mediacapture-screen-share/#extensions-to-mediatracksupportedconstraints * @see https://www.w3.org/TR/screen-capture */ function MediaTrackSupportedConstraints() {} /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.width; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.height; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.aspectRatio; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.frameRate; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.facingMode; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.resizeMode; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.volume; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.sampleRate; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.sampleSize; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.echoCancellation; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.autoGainControl; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.noiseSuppression; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.latency; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.channelCount; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.deviceId; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.groupId; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.displaySurface; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.logicalSurface; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.cursor; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.restrictOwnAudio; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.suppressLocalAudioPlayback; /** @type {boolean|undefined} */ MediaTrackSupportedConstraints.prototype.backgroundBlur; /** * @constructor * @implements {EventTarget} * @see https://www.w3.org/TR/mediacapture-streams/#mediastreamtrack */ function MediaStreamTrack() {} /** * @const {string} */ MediaStreamTrack.prototype.kind; /** * @const {string} */ MediaStreamTrack.prototype.id; /** * @const {string} */ MediaStreamTrack.prototype.label; /** * @type {boolean} */ MediaStreamTrack.prototype.enabled; /** * @const {boolean} */ MediaStreamTrack.prototype.muted; /** * @type {string} * @see https://crbug.com/653531 * @see https://wicg.github.io/mst-content-hint/ */ MediaStreamTrack.prototype.contentHint; /** * @const {boolean} */ MediaStreamTrack.prototype.remote; /** * @const {!MediaStreamTrackState} * Read only. */ MediaStreamTrack.prototype.readyState; /** * @type {?function(!Event)} */ MediaStreamTrack.prototype.onmute; /** * @type {?function(!Event)} */ MediaStreamTrack.prototype.onunmute; /** * @type {?function(!Event)} */ MediaStreamTrack.prototype.onended; /** * @type {?function(!Event)} */ MediaStreamTrack.prototype.onoverconstrained; /** * Applies the specified set of constraints to the track, if any specified; or * if no constraints are specified, removes all constraints from the track. * * @param {MediaTrackConstraints=} constraints Constraints to apply to the * track. * @return {!Promise<void>} A |Promise| that is resolved when the constraints * have been applied, or rejected if there was an error applying the * constraints. */ MediaStreamTrack.prototype.applyConstraints = function(constraints) {}; /** * @return {!MediaStreamTrack} */ MediaStreamTrack.prototype.clone = function() {}; /** @return {void} */ MediaStreamTrack.prototype.stop = function() {}; /** @return {!MediaTrackCapabilities} */ MediaStreamTrack.prototype.getCapabilities = function() {}; /** @return {!MediaTrackConstraints} */ MediaStreamTrack.prototype.getConstraints = function() {}; /** @return {!MediaTrackSettings} */ MediaStreamTrack.prototype.getSettings = function() {}; /** @override */ MediaStreamTrack.prototype.addEventListener = function( type, listener, opt_options) {}; /** @override */ MediaStreamTrack.prototype.removeEventListener = function( type, listener, opt_options) {}; /** * @override * @return {boolean} */ MediaStreamTrack.prototype.dispatchEvent = function(evt) {}; /** * @typedef {{track: MediaStreamTrack}} */ var MediaStreamTrackEventInit; /** * @param {string} type * @param {!MediaStreamTrackEventInit} eventInitDict * @constructor * @extends {Event} * @see https://www.w3.org/TR/mediacapture-streams/#mediastreamtrackevent */ function MediaStreamTrackEvent(type, eventInitDict) {} /** * @const {!MediaStreamTrack} */ MediaStreamTrackEvent.prototype.track; /** * @param {!MediaStream|!Array<!MediaStreamTrack>=} streamOrTracks * @constructor * @implements {EventTarget} * @see https://www.w3.org/TR/mediacapture-streams/#mediastream */ function MediaStream(streamOrTracks) {} /** * @override */ MediaStream.prototype.addEventListener = function( type, listener, opt_useCapture) {}; /** * @override */ MediaStream.prototype.removeEventListener = function( type, listener, opt_useCapture) {}; /** * @override * @return {boolean} */ MediaStream.prototype.dispatchEvent = function(evt) {}; /** * TODO(bemasc): Remove this property. * @deprecated * @const {string} */ MediaStream.prototype.label; /** * @const {string} */ MediaStream.prototype.id; /** * @return {!Array<!MediaStreamTrack>} */ MediaStream.prototype.getAudioTracks = function() {}; /** * @return {!Array<!MediaStreamTrack>} */ MediaStream.prototype.getVideoTracks = function() {}; /** * @return {!Array<!MediaStreamTrack>} */ MediaStream.prototype.getTracks = function() {}; /** * @param {string} trackId * @return {MediaStreamTrack} */ MediaStream.prototype.getTrackById = function(trackId) {}; /** * @param {!MediaStreamTrack} track * @return {undefined} */ MediaStream.prototype.addTrack = function(track) {}; /** * @param {!MediaStreamTrack} track * @return {undefined} */ MediaStream.prototype.removeTrack = function(track) {}; /** * @return {!MediaStream} */ MediaStream.prototype.clone = function() {}; /** * @deprecated * @type {boolean} */ MediaStream.prototype.ended; /** * @deprecated * @type {?function(!Event)} */ MediaStream.prototype.onended; /** * @type {boolean} */ MediaStream.prototype.active; /** * @type {?function(!Event)} */ MediaStream.prototype.onactive; /** * @type {?function(!Event)} */ MediaStream.prototype.oninactive; /** * @type {?function(!MediaStreamTrackEvent)} */ MediaStream.prototype.onaddtrack; /** * @type {?function(!MediaStreamTrackEvent)} */ MediaStream.prototype.onremovetrack; /** * @deprecated * TODO(bemasc): Remove this method once browsers have updated to * MediaStreamTrack.stop(). * @return {undefined} */ MediaStream.prototype.stop = function() {}; /** * @param {string} constraint * @param {string=} message * @constructor * @extends {Error} * @see https://www.w3.org/TR/mediacapture-streams/#overconstrainederror-interface */ function OverconstrainedError(constraint, message) {} /** * @const {string} * Read only. */ OverconstrainedError.prototype.constraint; /** * @typedef {{tone: string}} * @see https://www.w3.org/TR/webrtc/#dom-rtcdtmftonechangeeventinit */ var RTCDTMFToneChangeEventInit; /** * @param {string} type * @param {!RTCDTMFToneChangeEventInit} eventInitDict * @constructor * @extends {Event} * @see https://www.w3.org/TR/webrtc/#dom-rtcdtmftonechangeevent */ function RTCDTMFToneChangeEvent(type, eventInitDict) {} /** * @const {string} */ RTCDTMFToneChangeEvent.prototype.tone; /** * @interface * @see https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedVideoFrame/getMetadata */ function RTCEncodedVideoFrameMetadata() {} /** @type {Array<number>|undefined} */ RTCEncodedVideoFrameMetadata.prototype.contributingSources; /** @type {Array<number>|undefined} */ RTCEncodedVideoFrameMetadata.prototype.dependencies; /** @type {number|undefined} */ RTCEncodedVideoFrameMetadata.prototype.frameId; /** @type {number|undefined} */ RTCEncodedVideoFrameMetadata.prototype.height; /** @type {number|undefined} */ RTCEncodedVideoFrameMetadata.prototype.payloadType; /** @type {number|undefined} */ RTCEncodedVideoFrameMetadata.prototype.spatialIndex; /** @type {number|undefined} */ RTCEncodedVideoFrameMetadata.prototype.synchronizationSource; /** @type {number|undefined} */ RTCEncodedVideoFrameMetadata.prototype.temporalIndex; /** @type {number|undefined} */ RTCEncodedVideoFrameMetadata.prototype.timestamp; /** @type {number|undefined} */ RTCEncodedVideoFrameMetadata.prototype.width; /** * @constructor * @see https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame */ function RTCEncodedVideoFrame() {} /** * @const {!ArrayBuffer} */ RTCEncodedVideoFrame.prototype.data; /** * @const {number} */ RTCEncodedVideoFrame.prototype.timestamp; /** * @const {string} */ RTCEncodedVideoFrame.prototype.type; /** * @return {!RTCEncodedVideoFrameMetadata} */ RTCEncodedVideoFrame.prototype.getMetadata = function() {}; /** * @interface * @see https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame/getMetadata */ function RTCEncodedAudioFrameMetadata() {} /** @type {Array<number>|undefined} */ RTCEncodedAudioFrameMetadata.prototype.contributingSources; /** @type {number|undefined} */ RTCEncodedAudioFrameMetadata.prototype.payloadType; /** @type {number|undefined} */ RTCEncodedAudioFrameMetadata.prototype.sequenceNumber; /** @type {number|undefined} */ RTCEncodedAudioFrameMetadata.prototype.synchronizationSource; /** * @constructor * @see https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame */ function RTCEncodedAudioFrame() {} /** * @const {!ArrayBuffer} */ RTCEncodedAudioFrame.prototype.data; /** * @const {number} */ RTCEncodedAudioFrame.prototype.timestamp; /** * @return {!RTCEncodedAudioFrameMetadata} */ RTCEncodedAudioFrame.prototype.getMetadata = function() {}; /** * @interface * @see https://www.w3.org/TR/webrtc/#rtcdtmfsender */ function RTCDTMFSender() {} /** * @param {string} tones * @param {number=} opt_duration * @param {number=} opt_interToneGap */ RTCDTMFSender.prototype.insertDTMF = function( tones, opt_duration, opt_interToneGap) {}; /** * @type {?boolean} */ RTCDTMFSender.prototype.canInsertDTMF; /** * @type {?function(!RTCDTMFToneChangeEvent)} */ RTCDTMFSender.prototype.ontonechange; /** * @const {string} */ RTCDTMFSender.prototype.toneBuffer; /** * @typedef {{ * mimeType: string, * clockRate: number, * channels: (number|undefined), * sdpFmtpLine: (string|undefined), * }} * * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpcodeccapability */ var RTCRtpCodecCapability; /** * @typedef {{ * uri: string, * }} * * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpheaderextensioncapability */ var RTCRtpHeaderExtensionCapability; /** * @typedef {{ * codecs: !Array<!RTCRtpCodecCapability>, * headerExtensions: !Array<!RTCRtpHeaderExtensionCapability>, * }} * * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpcapabilities */ var RTCRtpCapabilities; /** * @record * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpheaderextensionparameters */ function RTCRtpHeaderExtensionParameters() {} /** @type {string} */ RTCRtpHeaderExtensionParameters.prototype.uri; /** @type {number} */ RTCRtpHeaderExtensionParameters.prototype.id; /** @type {boolean|undefined} */ RTCRtpHeaderExtensionParameters.prototype.encrypted; /** * @record * @see https://www.w3.org/TR/webrtc/#dom-rtcrtcpparameters */ function RTCRtcpParameters() {} /** @type {string|undefined} */ RTCRtcpParameters.prototype.cname; /** @type {boolean|undefined} */ RTCRtcpParameters.prototype.reducedSize; /** * @record * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpcodecparameters */ function RTCRtpCodecParameters() {} /** @type {number} */ RTCRtpCodecParameters.prototype.cname; /** @type {string} */ RTCRtpCodecParameters.prototype.mimeType; /** @type {number} */ RTCRtpCodecParameters.prototype.clockRate; /** @type {number} */ RTCRtpCodecParameters.prototype.channels; /** @type {string|undefined} */ RTCRtpCodecParameters.prototype.sdpFmtpLine; /** * @record * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpparameters */ function RTCRtpParameters() {} /** * @type {!Array<!RTCRtpHeaderExtensionParameters>} */ RTCRtpParameters.prototype.headerExtensions; /** * @type {!RTCRtcpParameters} */ RTCRtpParameters.prototype.rtcp; /** * @type {!Array<!RTCRtpCodecParameters>} */ RTCRtpParameters.prototype.codecs; /** * @record * @extends {RTCRtpParameters} * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpsendparameters */ function RTCRtpSendParameters() {} /** * @type {string} */ RTCRtpSendParameters.prototype.transactionId; /** * @type {!Array<!RTCRtpEncodingParameters>} */ RTCRtpSendParameters.prototype.encodings; /** * Possible string values are "maintain-framerate", "maintain-resolution", and * "balanced". * @type {string|undefined} */ RTCRtpSendParameters.prototype.degradationPreference; /** * @record * @extends {RTCRtpParameters} * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpreceiveparameters */ function RTCRtpReceiveParameters() {} /** * @constructor * @param {!Worker} worker * @param {?=} options * @param {!Array<?>=} transfer */ function RTCRtpScriptTransform(worker, options, transfer) {} /** * @constructor * @see https://www.w3.org/TR/webrtc/#rtcrtpsender-interface */ function RTCRtpSender() {} /** * @const {!RTCDTMFSender} */ RTCRtpSender.prototype.dtmf; /** * @const {?MediaStreamTrack} */ RTCRtpSender.prototype.track; /** * @const {?RTCDtlsTransport} */ RTCRtpSender.prototype.transport; /** * @const {?RTCRtpScriptTransform} */ RTCRtpSender.prototype.transform; /** * @param {?MediaStreamTrack} track * @return {!Promise<void>} * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpsender */ RTCRtpSender.prototype.replaceTrack = function(track) {}; /** * @return {!RTCRtpSendParameters} */ RTCRtpSender.prototype.getParameters = function() {}; /** * @param {!RTCRtpSendParameters} params * @return {!Promise<undefined>} */ RTCRtpSender.prototype.setParameters = function(params) {}; /** * @param {...!MediaStream} streams * @return {undefined} */ RTCRtpSender.prototype.setStreams = function(streams) {}; /** * @return {!Promise<!RTCStatsReport>} */ RTCRtpSender.prototype.getStats = function() {}; /** * @param {string} kind * @return {?RTCRtpCapabilities} */ RTCRtpSender.getCapabilities = function(kind) {}; /** * @interface * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpcontributingsource */ function RTCRtpContributingSource() {} /** * @type {?number} */ RTCRtpContributingSource.prototype.source; /** * @type {?Date|number} */ RTCRtpContributingSource.prototype.timestamp; /** * @type {number|undefined} */ RTCRtpContributingSource.prototype.audioLevel; /** * This is a relatively new field and browsers may not yet be compliant to the * spec. * @type {?number} * @see https://w3c.github.io/webrtc-pc/#dom-rtcrtpcontributingsource-rtptimestamp */ RTCRtpContributingSource.prototype.rtpTimestamp; /** * This is a relatively new field and browsers may not yet be compliant to the * spec. * @type {number|undefined} * @see https://w3c.github.io/webrtc-extensions/#dom-rtcrtpcontributingsource-capturetimestamp */ RTCRtpContributingSource.prototype.captureTimestamp; /** * This is a relatively new field and browsers may not yet be compliant to the * spec. * @type {number|undefined} * @see https://w3c.github.io/webrtc-extensions/#dom-rtcrtpcontributingsource-sendercapturetimeoffset */ RTCRtpContributingSource.prototype.senderCaptureTimeOffset; /** * @constructor * @see https://www.w3.org/TR/webrtc/#rtcrtpreceiver-interface */ function RTCRtpReceiver() {} /** @type {number|undefined}*/ RTCRtpReceiver.prototype.jitterBufferTarget; /** * @const {!MediaStreamTrack} */ RTCRtpReceiver.prototype.track; /** * @const {?RTCDtlsTransport} */ RTCRtpReceiver.prototype.transport; /** @type {?RTCRtpScriptTransform} */ RTCRtpReceiver.prototype.transform; /** * @return {!RTCRtpReceiveParameters} */ RTCRtpReceiver.prototype.getParameters = function() {}; /** * @return {!Array<!RTCRtpContributingSource>} */ RTCRtpReceiver.prototype.getContributingSources = function() {}; /** * @return {!Array<!RTCRtpContributingSource>} */ RTCRtpReceiver.prototype.getSynchronizationSources = function() {}; /** * @return {!Promise<!RTCStatsReport>} */ RTCRtpReceiver.prototype.getStats = function() {}; /** * Chrome exclusive hint to control jitter buffer delay. Measured in seconds. * @see https://henbos.github.io/webrtc-extensions/#dfn-playoutdelayhint * @type {?number|undefined} */ RTCRtpReceiver.prototype.playoutDelayHint; /** * Get most optimistic view of the capabilities of the system for sending media * of the given kind. * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpreceiver-getcapabilities * @param {!string} kind Media kind: 'video' or 'audio'. * @return {!RTCRtpCapabilities} */ RTCRtpReceiver.getCapabilities = function(kind) {}; /** * @see https://www.w3.org/TR/webrtc/#dom-rtcrtptransceiverinit * @record */ function RTCRtpTransceiverInit() {} /** * The direction of the `RTCRtpTransceiver`. Defaults to "sendrecv". * @type {?RTCRtpTransceiverDirection|undefined} */ RTCRtpTransceiverInit.prototype.direction; /** * The streams to add to the tranceiver's sender. * @type {?Array<!MediaStream>|undefined} */ RTCRtpTransceiverInit.prototype.streams; /** * @type {?Array<!RTCRtpEncodingParameters>|undefined} */ RTCRtpTransceiverInit.prototype.sendEncodings; /** * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpencodingparameters * @record */ function RTCRtpEncodingParameters() {} /** * @type {?number|undefined} */ RTCRtpEncodingParameters.prototype.codecPayloadType; /** * Possible values are "disabled" and "enabled". * @type {?string|undefined} */ RTCRtpEncodingParameters.prototype.dtx; /** * @type {?boolean|undefined} */ RTCRtpEncodingParameters.prototype.active; /** * Possible values are "very-low", "low" (default), "medium", and "high". * @type {?string|undefined} */ RTCRtpEncodingParameters.prototype.priority; /** * Possible values are "very-low", "low" (default), "medium", and "high". * @see https://w3c.github.io/webrtc-dscp-exp/ * @type {?string|undefined} */ RTCRtpEncodingParameters.prototype.networkPriority; /** * @type {?number|undefined} */ RTCRtpEncodingParameters.prototype.ptime; /** * @type {?number|undefined} */ RTCRtpEncodingParameters.prototype.maxBitrate; /** * @type {?number|undefined} */ RTCRtpEncodingParameters.prototype.maxFramerate; /** * @type {?string|number} */ RTCRtpEncodingParameters.prototype.rid; /** * @type {?number|number} */ RTCRtpEncodingParameters.prototype.scaleResolutionDownBy; /** * @see https://w3c.github.io/webrtc-extensions/#dom-rtcrtpencodingparameters-adaptiveptime * @type {?boolean|undefined} */ RTCRtpEncodingParameters.prototype.adaptivePtime; /** * @interface * @see https://www.w3.org/TR/webrtc/#rtcrtptransceiver-interface */ function RTCRtpTransceiver() {} /** * @const {?string} */ RTCRtpTransceiver.prototype.mid; /** * @const {boolean} */ RTCRtpTransceiver.prototype.stopped; /** * @type {!RTCRtpTransceiverDirection} */ RTCRtpTransceiver.prototype.direction; /** * @const {?RTCRtpTransceiverDirection} */ RTCRtpTransceiver.prototype.currentDirection; /** * @param {!RTCRtpTransceiverDirection} direction */ RTCRtpTransceiver.prototype.setDirection = function(direction) {}; /** */ RTCRtpTransceiver.prototype.stop = function() {}; /** * @const {?RTCRtpSender} */ RTCRtpTransceiver.prototype.sender; /** * @const {?RTCRtpReceiver} */ RTCRtpTransceiver.prototype.receiver; /** * @param {!Array<!RTCRtpCodecCapability>} codecs */ RTCRtpTransceiver.prototype.setCodecPreferences = function(codecs) {}; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-longrange * @record */ function LongRange() {} /** * @type {number|undefined} */ LongRange.prototype.max; /** * @type {number|undefined} */ LongRange.prototype.min; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-doublerange * @record */ function DoubleRange() {} /** * @type {number|undefined} */ DoubleRange.prototype.max; /** * @type {number|undefined} */ DoubleRange.prototype.min; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constrainbooleanparameters * @record */ function ConstrainBooleanParameters() {} /** * @type {boolean|undefined} */ ConstrainBooleanParameters.prototype.exact; /** * @type {boolean|undefined} */ ConstrainBooleanParameters.prototype.ideal; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constraindomstringparameters * @record */ function ConstrainDOMStringParameters() {} /** * @type {string|Array<string>|undefined} */ ConstrainDOMStringParameters.prototype.exact; /** * @type {string|Array<string>|undefined} */ ConstrainDOMStringParameters.prototype.ideal; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constraindoublerange * @record * @extends {DoubleRange} */ function ConstrainDoubleRange() {} /** * @type {number|undefined} */ ConstrainDoubleRange.prototype.exact; /** * @type {number|undefined} */ ConstrainDoubleRange.prototype.ideal; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constrainlongrange * @record * @extends {LongRange} */ function ConstrainLongRange() {} /** * @type {number|undefined} */ ConstrainLongRange.prototype.exact; /** * @type {number|undefined} */ ConstrainLongRange.prototype.ideal; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constrainboolean * @typedef {boolean|ConstrainBooleanParameters} */ var ConstrainBoolean; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constraindomString * @typedef {string|Array<string>|ConstrainDOMStringParameters} */ var ConstrainDOMString; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constraindouble * @typedef {number|ConstrainDoubleRange} */ var ConstrainDouble; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constrainlong * @typedef {number|ConstrainLongRange} */ var ConstrainLong; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-mediatrackconstraintset * @see https://w3c.github.io/mediacapture-screen-share/#extensions-to-mediatrackconstraintset * @see https://www.w3.org/TR/screen-capture * @record */ function MediaTrackConstraintSet() {} /** * @type {ConstrainBoolean|undefined} */ MediaTrackConstraintSet.prototype.autoGainControl; /** * @type {ConstrainDouble|undefined} */ MediaTrackConstraintSet.prototype.aspectRatio; /** * @type {ConstrainLong|undefined} */ MediaTrackConstraintSet.prototype.channelCount; /** * @type {ConstrainDOMString|undefined} */ MediaTrackConstraintSet.prototype.deviceId; /** * @type {ConstrainBoolean|undefined} */ MediaTrackConstraintSet.prototype.echoCancellation; /** * @type {ConstrainDOMString|undefined} */ MediaTrackConstraintSet.prototype.facingMode; /** * @type {ConstrainDouble|undefined} */ MediaTrackConstraintSet.prototype.frameRate; /** * @type {ConstrainDOMString|undefined} */ MediaTrackConstraintSet.prototype.groupId; /** * @type {ConstrainLong|undefined} */ MediaTrackConstraintSet.prototype.height; /** * @type {ConstrainDouble|undefined} */ MediaTrackConstraintSet.prototype.latency; /** * @type {ConstrainBoolean|undefined} */ MediaTrackConstraintSet.prototype.noiseSuppression; /** * @type {ConstrainDOMString|undefined} */ MediaTrackConstraintSet.prototype.resizeMode; /** * @type {ConstrainLong|undefined} */ MediaTrackConstraintSet.prototype.sampleRate; /** * @type {ConstrainLong|undefined} */ MediaTrackConstraintSet.prototype.sampleSize; /** * @type {ConstrainDouble|undefined} */ MediaTrackConstraintSet.prototype.volume; /** * @type {ConstrainLong|undefined} */ MediaTrackConstraintSet.prototype.width; /** @type {ConstrainDOMString|undefined} */ MediaTrackConstraintSet.prototype.displaySurface; /** @type {ConstrainBoolean|undefined} */ MediaTrackConstraintSet.prototype.logicalSurface; /** @type {ConstrainDOMString|undefined} */ MediaTrackConstraintSet.prototype.cursor; /** @type {ConstrainBoolean|undefined} */ MediaTrackConstraintSet.prototype.restrictOwnAudio; /** @type {ConstrainBoolean|undefined} */ MediaTrackConstraintSet.prototype.suppressLocalAudioPlayback; /** @type {ConstrainBoolean|undefined} */ MediaTrackConstraintSet.prototype.backgroundBlur; /** * @record * @extends {MediaTrackConstraintSet} */ function MediaTrackConstraints() {} /** * @type {Array<!MediaTrackConstraintSet>|undefined} */ MediaTrackConstraints.prototype.advanced; /** * @see https://w3c.github.io/mediacapture-main/getusermedia.html#media-track-constraints * @record */ function MediaStreamConstraints() {} /** * @type {boolean|MediaTrackConstraints|undefined} */ MediaStreamConstraints.prototype.audio; /** * @type {boolean|MediaTrackConstraints|undefined} */ MediaStreamConstraints.prototype.video; /** * @see https://wicg.github.io/prefer-current-tab/ * @type {boolean|undefined} */ MediaStreamConstraints.prototype.preferCurrentTab; /** * @type {string|undefined} */ MediaStreamConstraints.prototype.peerIdentity; /** * @constructor * @see https://w3c.github.io/mediacapture-screen-share/#dom-capturecontroller */ function CaptureController() {} /** * @param {string} focusBehavior * @return {undefined} * @see https://w3c.github.io/mediacapture-screen-share/#dom-capturestartfocusbehavior */ CaptureController.prototype.setFocusBehavior = function(focusBehavior) {}; /** * @see https://w3c.github.io/mediacapture-screen-share/#dom-displaymediastreamoptions * @record */ function DisplayMediaStreamOptions() {} /** * @type {boolean|MediaTrackConstraints|undefined} */ DisplayMediaStreamOptions.prototype.audio; /** * @type {boolean|MediaTrackConstraints|undefined} */ DisplayMediaStreamOptions.prototype.video; /** * @type {!CaptureController|undefined} */ DisplayMediaStreamOptions.prototype.controller; /** * @see https://w3c.github.io/mediacapture-screen-share/#dom-selfcapturepreferenceenum * @type {string|undefined} */ DisplayMediaStreamOptions.prototype.selfBrowserSurface; /** * @see https://w3c.github.io/mediacapture-screen-share/#dom-surfaceswitchingpreferenceenum * @type {string|undefined} */ DisplayMediaStreamOptions.prototype.surfaceSwitching; /** * @see https://w3c.github.io/mediacapture-screen-share/#dom-systemaudiopreferenceenum * @type {string|undefined} */ DisplayMediaStreamOptions.prototype.systemAudio; /** * @see https://wicg.github.io/prefer-current-tab/ * @type {boolean|undefined} */ DisplayMediaStreamOptions.prototype.preferCurrentTab; /** * @see {http://dev.w3.org/2011/webrtc/editor/getusermedia.html# * navigatorusermediaerror-and-navigatorusermediaerrorcallback} * @interface */ function NavigatorUserMediaError() {} /** * @const {number} * @deprecated Removed from the standard and some browsers. */ NavigatorUserMediaError.prototype.PERMISSION_DENIED; /** * @type {number} * @deprecated Removed from the standard and some browsers. * Read only. */ NavigatorUserMediaError.prototype.code; /** * @type {string} * Read only. */ NavigatorUserMediaError.prototype.name; /** * @type {?string} * Read only. */ NavigatorUserMediaError.prototype.message; /** * @type {?string} * Read only. */ NavigatorUserMediaError.prototype.constraintName; /** * @param {string} type * @param {!Object} eventInitDict * @constructor */ function MediaStreamEvent(type, eventInitDict) {} /** * @const {?MediaStream} */ MediaStreamEvent.prototype.stream; /** * @record * @see https://www.w3.org/TR/mediastream-recording/#dictdef-mediarecorderoptions */ function MediaRecorderOptions() {} /** @type {(string|undefined)} */ MediaRecorderOptions.prototype.mimeType /** @type {(number|undefined)} */ MediaRecorderOptions.prototype.audioBitsPerSecond /** @type {(number|undefined)} */ MediaRecorderOptions.prototype.videoBitsPerSecond /** @type {(number|undefined)} */ MediaRecorderOptions.prototype.bitsPerSecond /** * @see https://www.w3.org/TR/mediastream-recording/#mediarecorder-api * @param {!MediaStream} stream * @param {MediaRecorderOptions=} options * @implements {EventTarget} * @constructor */ function MediaRecorder(stream, options) {} /** * @override */ MediaRecorder.prototype.addEventListener = function( type, listener, opt_useCapture) {}; /** * @override */ MediaRecorder.prototype.removeEventListener = function( type, listener, opt_useCapture) {}; /** * @override * @return {boolean} */ MediaRecorder.prototype.dispatchEvent = function(evt) {}; /** * @type {!MediaStream} */ MediaRecorder.prototype.stream; /** * @type {string} */ MediaRecorder.prototype.mimeType; /** * @type {string} */ MediaRecorder.prototype.state; /** * @type {(function(!Event)|undefined)} */ MediaRecorder.prototype.onstart; /** * @type {(function(!Event)|undefined)} */ MediaRecorder.prototype.onstop; /** * @type {(function(!Event)|undefined)} */ MediaRecorder.prototype.ondataavailable; /** * @type {(function(!Event)|undefined)} */ MediaRecorder.prototype.onpause; /** * @type {(function(!Event)|undefined)} */ MediaRecorder.prototype.onresume; /** * @type {(function(!Event)|undefined)} */ MediaRecorder.prototype.onerror; /** * @type {number} */ MediaRecorder.prototype.videoBitsPerSecond; /** * @type {number} */ MediaRecorder.prototype.audioBitsPerSecond; /** * @param {number=} timeslice */ MediaRecorder.prototype.start = function(timeslice) {}; /** @return {void} */ MediaRecorder.prototype.stop = function() {}; /** @return {void} */ MediaRecorder.prototype.pause = function() {}; /** @return {void} */ MediaRecorder.prototype.resume = function() {}; /** @return {void} */ MediaRecorder.prototype.requestData = function() {}; /** * @param {string} type * @return {boolean} */ MediaRecorder.isTypeSupported = function(type) {}; /** * @see https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorderErrorEvent * @interface */ function MediaRecorderErrorEvent() {} /** * @type {DOMException} type */ MediaRecorderErrorEvent.prototype.error; /** * @interface */ function MediaRecorderEventMap() {} /** @type {BlobEvent} */ MediaRecorderEventMap.prototype.dataavailable; /** @type {Event} */ MediaRecorderEventMap.prototype.error; /** @type {Event} */ MediaRecorderEventMap.prototype.pause; /** @type {Event} */ MediaRecorderEventMap.prototype.resume; /** @type {Event} */ MediaRecorderEventMap.prototype.start; /** @type {Event} */ MediaRecorderEventMap.prototype.stop; /** * @constructor * @extends {Event} * @param {string} type * @param {{data: !Blob, timecode: (number|undefined)}} eventInitDict * @see https://www.w3.org/TR/mediastream-recording/#blobevent-section */ function BlobEvent(type, eventInitDict) {} /** @type {!Blob} */ BlobEvent.prototype.data; /** @type {number} */ BlobEvent.prototype.timecode; /** * @interface * @see https://w3c.github.io/mediacapture-image/##photosettings-section */ function PhotoSettings() {} /** * @type {string} */ PhotoSettings.prototype.fillLightMode; /** * @type {number} */ PhotoSettings.prototype.imageHeight; /** * @type {number} */ PhotoSettings.prototype.imageWidth; /** * @type {boolean} */ PhotoSettings.prototype.redEyeReduction; /** * @interface * @see https://w3c.github.io/mediacapture-image/##photocapabilities-section */ function PhotoCapabilities() {} /** * @const {string} */ PhotoCapabilities.prototype.redEyeReduction; /** * @const {!MediaSettingsRange} */ PhotoCapabilities.prototype.imageHeight; /** * @const {!MediaSettingsRange} */ PhotoCapabilities.prototype.imageWidth; /** * @const {!Array<string>} */ PhotoCapabilities.prototype.fillLightMode; /** * @see https://w3c.github.io/mediacapture-image/ * @param {!MediaStreamTrack} videoTrack * @constructor */ function ImageCapture(videoTrack) {} /** * @param {!PhotoSettings=} photoSettings * @return {!Promise<!Blob>} */ ImageCapture.prototype.takePhoto = function(photoSettings) {}; /** * @return {!Promise<!PhotoCapabilities>} */ ImageCapture.prototype.getPhotoCapabilities = function() {}; /** * @return {!Promise<!ImageBitmap>} */ ImageCapture.prototype.grabFrame = function() {}; /** * @const {!MediaStreamTrack} */ ImageCapture.prototype.track; /** * @see https://www.w3.org/TR/webrtc/#rtctrackevent * @param {string} type * @param {!Object} eventInitDict * @constructor */ function RTCTrackEvent(type, eventInitDict) {} /** * @const {!RTCRtpReceiver} */ RTCTrackEvent.prototype.receiver; /** * @const {!MediaStreamTrack} */ RTCTrackEvent.prototype.track; /** * @const {!Array<!MediaStream>} */ RTCTrackEvent.prototype.streams; /** * @const {!RTCRtpTransceiver} */ RTCTrackEvent.prototype.transceiver; /** * @typedef {string} * @see https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaDeviceKind * In WebIDL this is an enum with values 'audioinput', 'audiooutput', and * 'videoinput', but there is no mechanism in Closure for describing a * specialization of the string type. */ var MediaDeviceKind; /** * Possible values are "sendrecv", "sendonly", "recvonly", and "inactive". * @typedef {string} * @see https://www.w3.org/TR/webrtc/#dom-rtcrtptransceiverdirection */ var RTCRtpTransceiverDirection; /** * @interface */ function MediaDeviceInfo() {} /** @const {string} */ MediaDeviceInfo.prototype.deviceId; /** @const {!MediaDeviceKind} */ MediaDeviceInfo.prototype.kind; /** @const {string} */ MediaDeviceInfo.prototype.label; /** @const {string} */ MediaDeviceInfo.prototype.groupId; /** * @interface * @extends {MediaDeviceInfo} * @see https://www.w3.org/TR/mediacapture-streams/#input-specific-device-info */ function InputDeviceInfo() {} /** @return {!MediaTrackCapabilities} */ InputDeviceInfo.prototype.getCapabilities = function() {}; /** * @interface * @extends {EventTarget} * @see https://www.w3.org/TR/mediacapture-streams/#mediadevices */ function MediaDevices() {} /** @type {?function (!Event)} */ MediaDevices.prototype.ondevicechange; /** * @return {!Promise<!Array<!MediaDeviceInfo>>} */ MediaDevices.prototype.enumerateDevices = function() {}; /** * @see https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia * @param {!MediaStreamConstraints} constraints * @return {!Promise<!MediaStream>} */ MediaDevices.prototype.getUserMedia = function(constraints) {}; /** * @see https://w3c.github.io/mediacapture-screen-share/#dom-mediadevices-getdisplaymedia * @param {!DisplayMediaStreamOptions=} options * @return {!Promise<!MediaStream>} */ MediaDevices.prototype.getDisplayMedia = function(options) {}; /** * @see https://w3c.github.io/mediacapture-main/#dom-mediadevices-getsupportedconstraints * @return {!MediaTrackSupportedConstraints} */ MediaDevices.prototype.getSupportedConstraints = function() {}; /** @const {!MediaDevices} */ Navigator.prototype.mediaDevices; /** * @typedef {string} * @see https://www.w3.org/TR/webrtc/#rtcsdptype * In WebIDL this is an enum with values 'offer', 'pranswer', and 'answer', * but there is no mechanism in Closure for describing a specialization of * the string type. */ var RTCSdpType; /** * @record * @see https://www.w3.org/TR/webrtc/#dom-rtcsessiondescriptioninit */ function RTCSessionDescriptionInit() {} /** * @type {RTCSdpType|undefined} */ RTCSessionDescriptionInit.prototype.type; /** * @type {string|undefined} */ RTCSessionDescriptionInit.prototype.sdp; /** * @param {!RTCSessionDescriptionInit=} descriptionInitDict * @constructor * @see https://www.w3.org/TR/webrtc/#rtcsessiondescription-class */ function RTCSessionDescription(descriptionInitDict) {} /** * @type {RTCSdpType} * @see https://www.w3.org/TR/webrtc/#dom-rtcsessiondescription-type */ RTCSessionDescription.prototype.type; /** * @type {string} * @see https://www.w3.org/TR/webrtc/#dom-rtcsessiondescription-sdp */ RTCSessionDescription.prototype.sdp; /** * TODO(bemasc): Remove this definition once it is removed from the browser. * @param {string} label The label index (audio/video/data -> 0,1,2) * @param {string} sdp The ICE candidate in SDP text form * @constructor */ function IceCandidate(label, sdp) {} /** * @return {string} */ IceCandidate.prototype.toSdp = function() {}; /** * @type {?string} */ IceCandidate.prototype.label; /** @record */ function RTCIceCandidateInit() {}; /** @type {?string|undefined} */ RTCIceCandidateInit.prototype.candidate; /** @type {(?string|undefined)} */ RTCIceCandidateInit.prototype.sdpMid; /** @type {(?number|undefined)} */ RTCIceCandidateInit.prototype.sdpMLineIndex; /** @type {(string|undefined)} */ RTCIceCandidateInit.prototype.usernameFragment; /** * @param {!RTCIceCandidateInit=} candidateInitDict The RTCIceCandidateInit * dictionary. * @constructor * @see https://www.w3.org/TR/webrtc/#rtcicecandidate-interface */ function RTCIceCandidate(candidateInitDict) {} /** @type {string} */ RTCIceCandidate.prototype.candidate; /** @type {?string} */ RTCIceCandidate.prototype.sdpMid; /** @type {?number} */ RTCIceCandidate.prototype.sdpMLineIndex; /** @type {?string} */ RTCIceCandidate.prototype.foundation; /** @type {?string} */ RTCIceCandidate.prototype.component; /** @type {?number} */ RTCIceCandidate.prototype.priority; /** @type {?string} */ RTCIceCandidate.prototype.address; /** @type {?string} */ RTCIceCandidate.prototype.protocol; /** @type {?number} */ RTCIceCandidate.prototype.port; /** @type {?string} */ RTCIceCandidate.prototype.type; /** @type {?string} */ RTCIceCandidate.prototype.tcpType; /** @type {?string} */ RTCIceCandidate.prototype.relatedAddress; /** @type {?number} */ RTCIceCandidate.prototype.relatedPort; /** @type {?string} */ RTCIceCandidate.prototype.usernameFragment; /** * @typedef {{urls: string}|{urls: !Array<string>}} * @private * @see https://www.w3.org/TR/webrtc/#rtciceserver-dictionary * This dictionary type also has an optional key {credential: ?string}. */ var RTCIceServerRecord_; /** * @interface * @private */ function RTCIceServerInterface_() {} /** * @type {string|!Array<string>} */ RTCIceServerInterface_.prototype.urls; /** * @type {?string} */ RTCIceServerInterface_.prototype.username; /** * @type {?string} */ RTCIceServerInterface_.prototype.credential; /** * This type, and several below it, are constructed as unions between records * * @typedef {RTCIceServerRecord_|RTCIceServerInterface_} * @private */ var RTCIceServer; /** * @record * @see https://www.w3.org/TR/webrtc/#dom-rtcconfiguration */ function RTCConfiguration() {} /** * @type {!Array<!RTCIceServer>} */ RTCConfiguration.prototype.iceServers; /** * Allows specifying the ICE transport policy. Valid values are "all" and * "relay", with "all" being the default. * @type {string|undefined} */ RTCConfiguration.prototype.iceTransportPolicy; /** * Indicates which media-bundling policy to use when gathering ICE candidates. * Valid values are "balanced", "max-compat" and "max-bundle", with "balanced" * being the default. * @type {string|undefined} */ RTCConfiguration.prototype.bundlePolicy; /** * Indicates which rtcp-mux policy to use when gathering ICE candidates. The * only valid value is "require". * @type {string|undefined} */ RTCConfiguration.prototype.rtcpMuxPolicy; /** @type {!Array<!RTCCertificate>|undefined} */ RTCConfiguration.prototype.certificates; /** @type {number|undefined} */ RTCConfiguration.prototype.iceCandidatePoolSize; /** * Allows specifying the SDP semantics. Valid values are "plan-b" and * "unified-plan". * * @see {@link https://webrtc.org/web-apis/chrome/unified-plan/} * @type {string|undefined} */ RTCConfiguration.prototype.sdpSemantics; /** * @typedef {function(!RTCSessionDescription)} */ var RTCSessionDescriptionCallback; /** * @typedef {function(string)} */ var RTCPeerConnectionErrorCallback; /** * @typedef {function()} */ var RTCVoidCallback; /** * @typedef {string} */ var RTCDtlsRole; /** * @typedef {string} */ var RTCSignalingState; /** * @typedef {string} */ var RTCIceConnectionState; /** * @typedef {string} */ var RTCIceGatheringState; /** * @typedef {string} */ var RTCIceRole; /** * @typedef {string} */ var RTCIceTransportState; /** * @see https://www.w3.org/TR/webrtc/#rtcpeerconnectionstate-enum * @typedef {string} */ var RTCPeerConnectionState; /** * @typedef {string} */ var RTCQualityLimitationReason; /** * @see https://www.w3.org/TR/webrtc/#dom-rtcpeerconnectioniceevent * @param {string} type * @param {!Object} eventInitDict * @extends {Event} * @constructor */ function RTCPeerConnectionIceEvent(type, eventInitDict) {} /** * @const {RTCIceCandidate} */ RTCPeerConnectionIceEvent.prototype.candidate; /** * @const {?string} */ RTCPeerConnectionIceEvent.prototype.url; /** * @see https://www.w3.org/TR/webrtc/#dom-rtcpeerconnectioniceerrorevent * @param {string} type * @param {!Object} eventInitDict * @extends {Event} * @constructor */ function RTCPeerConnectionIceErrorEvent(type, eventInitDict) {} /** @const {?string} */ RTCPeerConnectionIceErrorEvent.prototype.address; /** @const {?number} */ RTCPeerConnectionIceErrorEvent.prototype.port; /** @const {string} */ RTCPeerConnectionIceErrorEvent.prototype.url; /** @const {number} */ RTCPeerConnectionIceErrorEvent.prototype.errorCode; /** @const {string} */ RTCPeerConnectionIceErrorEvent.prototype.errorText; /** * @constructor * @see https://www.w3.org/TR/webrtc/#dom-rtcicecandidatepair */ function RTCIceCandidatePair() {} /** @const {!RTCIceCandidate|undefined} */ RTCIceCandidatePair.prototype.local; /** @const {!RTCIceCandidate|undefined} */ RTCIceCandidatePair.prototype.remote; /** * @constructor * @see https://www.w3.org/TR/webrtc/#dom-rtciceparameters */ function RTCIceParameters() {} /** @const {string|undefined} */ RTCIceParameters.prototype.usernameFragment; /** @const {string|undefined} */ RTCIceParameters.prototype.password; /** * @interface * @exte