/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ /// ///////////////////////////// /// DOM APIs ///////////////////////////// interface Account { displayName: string; id: string; imageURL?: string; name?: string; rpDisplayName: string; } interface AddEventListenerOptions extends EventListenerOptions { once?: boolean; passive?: boolean; } interface AesCbcParams extends Algorithm { iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; } interface AesCtrParams extends Algorithm { counter: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; length: number; } interface AesDerivedKeyParams extends Algorithm { length: number; } interface AesGcmParams extends Algorithm { additionalData?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; tagLength?: number; } interface AesKeyAlgorithm extends KeyAlgorithm { length: number; } interface AesKeyGenParams extends Algorithm { length: number; } interface Algorithm { name: string; } interface AnalyserOptions extends AudioNodeOptions { fftSize?: number; maxDecibels?: number; minDecibels?: number; smoothingTimeConstant?: number; } interface AnimationEventInit extends EventInit { animationName?: string; elapsedTime?: number; pseudoElement?: string; } interface AnimationPlaybackEventInit extends EventInit { currentTime?: number | null; timelineTime?: number | null; } interface AssertionOptions { allowList?: ScopedCredentialDescriptor[]; extensions?: WebAuthnExtensions; rpId?: string; timeoutSeconds?: number; } interface AssignedNodesOptions { flatten?: boolean; } interface AudioBufferOptions { length: number; numberOfChannels?: number; sampleRate: number; } interface AudioBufferSourceOptions { buffer?: AudioBuffer | null; detune?: number; loop?: boolean; loopEnd?: number; loopStart?: number; playbackRate?: number; } interface AudioContextInfo { currentTime?: number; sampleRate?: number; } interface AudioContextOptions { latencyHint?: AudioContextLatencyCategory | number; sampleRate?: number; } interface AudioNodeOptions { channelCount?: number; channelCountMode?: ChannelCountMode; channelInterpretation?: ChannelInterpretation; } interface AudioParamDescriptor { automationRate?: AutomationRate; defaultValue?: number; maxValue?: number; minValue?: number; name: string; } interface AudioProcessingEventInit extends EventInit { inputBuffer: AudioBuffer; outputBuffer: AudioBuffer; playbackTime: number; } interface AudioTimestamp { contextTime?: number; performanceTime?: number; } interface AudioWorkletNodeOptions extends AudioNodeOptions { numberOfInputs?: number; numberOfOutputs?: number; outputChannelCount?: number[]; parameterData?: Record; processorOptions?: any; } interface AuthenticationExtensionsClientInputs { appid?: string; authnSel?: AuthenticatorSelectionList; exts?: boolean; loc?: boolean; txAuthGeneric?: txAuthGenericArg; txAuthSimple?: string; uvi?: boolean; uvm?: boolean; } interface AuthenticationExtensionsClientOutputs { appid?: boolean; authnSel?: boolean; exts?: AuthenticationExtensionsSupported; loc?: Coordinates; txAuthGeneric?: ArrayBuffer; txAuthSimple?: string; uvi?: ArrayBuffer; uvm?: UvmEntries; } interface AuthenticatorSelectionCriteria { authenticatorAttachment?: AuthenticatorAttachment; requireResidentKey?: boolean; userVerification?: UserVerificationRequirement; } interface BiquadFilterOptions extends AudioNodeOptions { Q?: number; detune?: number; frequency?: number; gain?: number; type?: BiquadFilterType; } interface BlobPropertyBag { endings?: EndingType; type?: string; } interface ByteLengthChunk { byteLength?: number; } interface CacheQueryOptions { ignoreMethod?: boolean; ignoreSearch?: boolean; ignoreVary?: boolean; } interface CanvasRenderingContext2DSettings { alpha?: boolean; desynchronized?: boolean; } interface ChannelMergerOptions extends AudioNodeOptions { numberOfInputs?: number; } interface ChannelSplitterOptions extends AudioNodeOptions { numberOfOutputs?: number; } interface ClientData { challenge: string; extensions?: WebAuthnExtensions; hashAlg: string | Algorithm; origin: string; rpId: string; tokenBinding?: string; } interface ClientQueryOptions { includeUncontrolled?: boolean; type?: ClientTypes; } interface ClipboardEventInit extends EventInit { clipboardData?: DataTransfer | null; } interface CloseEventInit extends EventInit { code?: number; reason?: string; wasClean?: boolean; } interface CompositionEventInit extends UIEventInit { data?: string; } interface ComputedEffectTiming extends EffectTiming { activeDuration?: number; currentIteration?: number | null; endTime?: number; localTime?: number | null; progress?: number | null; } interface ComputedKeyframe { composite: CompositeOperationOrAuto; computedOffset: number; easing: string; offset: number | null; [property: string]: string | number | null | undefined; } interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation { arrayOfDomainStrings?: string[]; } interface ConstantSourceOptions { offset?: number; } interface ConstrainBooleanParameters { exact?: boolean; ideal?: boolean; } interface ConstrainDOMStringParameters { exact?: string | string[]; ideal?: string | string[]; } interface ConstrainDoubleRange extends DoubleRange { exact?: number; ideal?: number; } interface ConstrainULongRange extends ULongRange { exact?: number; ideal?: number; } interface ConstrainVideoFacingModeParameters { exact?: VideoFacingModeEnum | VideoFacingModeEnum[]; ideal?: VideoFacingModeEnum | VideoFacingModeEnum[]; } interface ConvolverOptions extends AudioNodeOptions { buffer?: AudioBuffer | null; disableNormalization?: boolean; } interface CredentialCreationOptions { publicKey?: PublicKeyCredentialCreationOptions; signal?: AbortSignal; } interface CredentialRequestOptions { mediation?: CredentialMediationRequirement; publicKey?: PublicKeyCredentialRequestOptions; signal?: AbortSignal; } interface CustomEventInit extends EventInit { detail?: T; } interface DOMMatrix2DInit { a?: number; b?: number; c?: number; d?: number; e?: number; f?: number; m11?: number; m12?: number; m21?: number; m22?: number; m41?: number; m42?: number; } interface DOMMatrixInit extends DOMMatrix2DInit { is2D?: boolean; m13?: number; m14?: number; m23?: number; m24?: number; m31?: number; m32?: number; m33?: number; m34?: number; m43?: number; m44?: number; } interface DOMPointInit { w?: number; x?: number; y?: number; z?: number; } interface DOMQuadInit { p1?: DOMPointInit; p2?: DOMPointInit; p3?: DOMPointInit; p4?: DOMPointInit; } interface DOMRectInit { height?: number; width?: number; x?: number; y?: number; } interface DelayOptions extends AudioNodeOptions { delayTime?: number; maxDelayTime?: number; } interface DeviceLightEventInit extends EventInit { value?: number; } interface DeviceMotionEventAccelerationInit { x?: number | null; y?: number | null; z?: number | null; } interface DeviceMotionEventInit extends EventInit { acceleration?: DeviceMotionEventAccelerationInit; accelerationIncludingGravity?: DeviceMotionEventAccelerationInit; interval?: number; rotationRate?: DeviceMotionEventRotationRateInit; } interface DeviceMotionEventRotationRateInit { alpha?: number | null; beta?: number | null; gamma?: number | null; } interface DeviceOrientationEventInit extends EventInit { absolute?: boolean; alpha?: number | null; beta?: number | null; gamma?: number | null; } interface DevicePermissionDescriptor extends PermissionDescriptor { deviceId?: string; name: "camera" | "microphone" | "speaker"; } interface DocumentTimelineOptions { originTime?: number; } interface DoubleRange { max?: number; min?: number; } interface DragEventInit extends MouseEventInit { dataTransfer?: DataTransfer | null; } interface DynamicsCompressorOptions extends AudioNodeOptions { attack?: number; knee?: number; ratio?: number; release?: number; threshold?: number; } interface EcKeyAlgorithm extends KeyAlgorithm { namedCurve: NamedCurve; } interface EcKeyGenParams extends Algorithm { namedCurve: NamedCurve; } interface EcKeyImportParams extends Algorithm { namedCurve: NamedCurve; } interface EcdhKeyDeriveParams extends Algorithm { public: CryptoKey; } interface EcdsaParams extends Algorithm { hash: HashAlgorithmIdentifier; } interface EffectTiming { delay?: number; direction?: PlaybackDirection; duration?: number | string; easing?: string; endDelay?: number; fill?: FillMode; iterationStart?: number; iterations?: number; } interface ElementCreationOptions { is?: string; } interface ElementDefinitionOptions { extends?: string; } interface ErrorEventInit extends EventInit { colno?: number; error?: any; filename?: string; lineno?: number; message?: string; } interface EventInit { bubbles?: boolean; cancelable?: boolean; composed?: boolean; } interface EventListenerOptions { capture?: boolean; } interface EventModifierInit extends UIEventInit { altKey?: boolean; ctrlKey?: boolean; metaKey?: boolean; modifierAltGraph?: boolean; modifierCapsLock?: boolean; modifierFn?: boolean; modifierFnLock?: boolean; modifierHyper?: boolean; modifierNumLock?: boolean; modifierScrollLock?: boolean; modifierSuper?: boolean; modifierSymbol?: boolean; modifierSymbolLock?: boolean; shiftKey?: boolean; } interface EventSourceInit { withCredentials?: boolean; } interface ExceptionInformation { domain?: string | null; } interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } interface FocusEventInit extends UIEventInit { relatedTarget?: EventTarget | null; } interface FocusNavigationEventInit extends EventInit { navigationReason?: string | null; originHeight?: number; originLeft?: number; originTop?: number; originWidth?: number; } interface FocusNavigationOrigin { originHeight?: number; originLeft?: number; originTop?: number; originWidth?: number; } interface FocusOptions { preventScroll?: boolean; } interface FullscreenOptions { navigationUI?: FullscreenNavigationUI; } interface GainOptions extends AudioNodeOptions { gain?: number; } interface GamepadEventInit extends EventInit { gamepad: Gamepad; } interface GetNotificationOptions { tag?: string; } interface GetRootNodeOptions { composed?: boolean; } interface HashChangeEventInit extends EventInit { newURL?: string; oldURL?: string; } interface HkdfParams extends Algorithm { hash: HashAlgorithmIdentifier; info: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; } interface HmacImportParams extends Algorithm { hash: HashAlgorithmIdentifier; length?: number; } interface HmacKeyAlgorithm extends KeyAlgorithm { hash: KeyAlgorithm; length: number; } interface HmacKeyGenParams extends Algorithm { hash: HashAlgorithmIdentifier; length?: number; } interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; } interface IDBObjectStoreParameters { autoIncrement?: boolean; keyPath?: string | string[] | null; } interface IDBVersionChangeEventInit extends EventInit { newVersion?: number | null; oldVersion?: number; } interface IIRFilterOptions extends AudioNodeOptions { feedback: number[]; feedforward: number[]; } interface ImageBitmapRenderingContextSettings { alpha?: boolean; } interface ImageEncodeOptions { quality?: number; type?: string; } interface InputEventInit extends UIEventInit { data?: string | null; inputType?: string; isComposing?: boolean; } interface IntersectionObserverEntryInit { boundingClientRect: DOMRectInit; intersectionRatio: number; intersectionRect: DOMRectInit; isIntersecting: boolean; rootBounds: DOMRectInit | null; target: Element; time: number; } interface IntersectionObserverInit { root?: Element | null; rootMargin?: string; threshold?: number | number[]; } interface JsonWebKey { alg?: string; crv?: string; d?: string; dp?: string; dq?: string; e?: string; ext?: boolean; k?: string; key_ops?: string[]; kty?: string; n?: string; oth?: RsaOtherPrimesInfo[]; p?: string; q?: string; qi?: string; use?: string; x?: string; y?: string; } interface KeyAlgorithm { name: string; } interface KeyboardEventInit extends EventModifierInit { code?: string; isComposing?: boolean; key?: string; location?: number; repeat?: boolean; } interface Keyframe { composite?: CompositeOperationOrAuto; easing?: string; offset?: number | null; [property: string]: string | number | null | undefined; } interface KeyframeAnimationOptions extends KeyframeEffectOptions { id?: string; } interface KeyframeEffectOptions extends EffectTiming { composite?: CompositeOperation; iterationComposite?: IterationCompositeOperation; } interface MediaElementAudioSourceOptions { mediaElement: HTMLMediaElement; } interface MediaEncryptedEventInit extends EventInit { initData?: ArrayBuffer | null; initDataType?: string; } interface MediaKeyMessageEventInit extends EventInit { message: ArrayBuffer; messageType: MediaKeyMessageType; } interface MediaKeySystemConfiguration { audioCapabilities?: MediaKeySystemMediaCapability[]; distinctiveIdentifier?: MediaKeysRequirement; initDataTypes?: string[]; label?: string; persistentState?: MediaKeysRequirement; sessionTypes?: string[]; videoCapabilities?: MediaKeySystemMediaCapability[]; } interface MediaKeySystemMediaCapability { contentType?: string; robustness?: string; } interface MediaQueryListEventInit extends EventInit { matches?: boolean; media?: string; } interface MediaStreamAudioSourceOptions { mediaStream: MediaStream; } interface MediaStreamConstraints { audio?: boolean | MediaTrackConstraints; peerIdentity?: string; video?: boolean | MediaTrackConstraints; } interface MediaStreamErrorEventInit extends EventInit { error?: MediaStreamError | null; } interface MediaStreamEventInit extends EventInit { stream?: MediaStream; } interface MediaStreamTrackAudioSourceOptions { mediaStreamTrack: MediaStreamTrack; } interface MediaStreamTrackEventInit extends EventInit { track: MediaStreamTrack; } interface MediaTrackCapabilities { aspectRatio?: DoubleRange; autoGainControl?: boolean[]; channelCount?: ULongRange; deviceId?: string; echoCancellation?: boolean[]; facingMode?: string[]; frameRate?: DoubleRange; groupId?: string; height?: ULongRange; latency?: DoubleRange; noiseSuppression?: boolean[]; resizeMode?: string[]; sampleRate?: ULongRange; sampleSize?: ULongRange; width?: ULongRange; } interface MediaTrackConstraintSet { aspectRatio?: ConstrainDouble; autoGainControl?: ConstrainBoolean; channelCount?: ConstrainULong; deviceId?: ConstrainDOMString; echoCancellation?: ConstrainBoolean; facingMode?: ConstrainDOMString; frameRate?: ConstrainDouble; groupId?: ConstrainDOMString; height?: ConstrainULong; latency?: ConstrainDouble; noiseSuppression?: ConstrainBoolean; resizeMode?: ConstrainDOMString; sampleRate?: ConstrainULong; sampleSize?: ConstrainULong; width?: ConstrainULong; } interface MediaTrackConstraints extends MediaTrackConstraintSet { advanced?: MediaTrackConstraintSet[]; } interface MediaTrackSettings { aspectRatio?: number; autoGainControl?: boolean; channelCount?: number; deviceId?: string; echoCancellation?: boolean; facingMode?: string; frameRate?: number; groupId?: string; height?: number; latency?: number; noiseSuppression?: boolean; resizeMode?: string; sampleRate?: number; sampleSize?: number; width?: number; } interface MediaTrackSupportedConstraints { aspectRatio?: boolean; autoGainControl?: boolean; channelCount?: boolean; deviceId?: boolean; echoCancellation?: boolean; facingMode?: boolean; frameRate?: boolean; groupId?: boolean; height?: boolean; latency?: boolean; noiseSuppression?: boolean; resizeMode?: boolean; sampleRate?: boolean; sampleSize?: boolean; width?: boolean; } interface MessageEventInit extends EventInit { data?: any; lastEventId?: string; origin?: string; ports?: MessagePort[]; source?: MessageEventSource | null; } interface MidiPermissionDescriptor extends PermissionDescriptor { name: "midi"; sysex?: boolean; } interface MouseEventInit extends EventModifierInit { button?: number; buttons?: number; clientX?: number; clientY?: number; movementX?: number; movementY?: number; relatedTarget?: EventTarget | null; screenX?: number; screenY?: number; } interface MultiCacheQueryOptions extends CacheQueryOptions { cacheName?: string; } interface MutationObserverInit { /** * Set to a list of attribute local names (without namespace) if not all attribute mutations need to be observed and attributes is true or omitted. */ attributeFilter?: string[]; /** * Set to true if attributes is true or omitted and target's attribute value before the mutation needs to be recorded. */ attributeOldValue?: boolean; /** * Set to true if mutations to target's attributes are to be observed. Can be omitted if attributeOldValue or attributeFilter is specified. */ attributes?: boolean; /** * Set to true if mutations to target's data are to be observed. Can be omitted if characterDataOldValue is specified. */ characterData?: boolean; /** * Set to true if characterData is set to true or omitted and target's data before the mutation needs to be recorded. */ characterDataOldValue?: boolean; /** * Set to true if mutations to target's children are to be observed. */ childList?: boolean; /** * Set to true if mutations to not just target, but also target's descendants are to be observed. */ subtree?: boolean; } interface NavigationPreloadState { enabled?: boolean; headerValue?: string; } interface NotificationAction { action: string; icon?: string; title: string; } interface NotificationOptions { actions?: NotificationAction[]; badge?: string; body?: string; data?: any; dir?: NotificationDirection; icon?: string; image?: string; lang?: string; renotify?: boolean; requireInteraction?: boolean; silent?: boolean; tag?: string; timestamp?: number; vibrate?: VibratePattern; } interface OfflineAudioCompletionEventInit extends EventInit { renderedBuffer: AudioBuffer; } interface OfflineAudioContextOptions { length: number; numberOfChannels?: number; sampleRate: number; } interface OptionalEffectTiming { delay?: number; direction?: PlaybackDirection; duration?: number | string; easing?: string; endDelay?: number; fill?: FillMode; iterationStart?: number; iterations?: number; } interface OscillatorOptions extends AudioNodeOptions { detune?: number; frequency?: number; periodicWave?: PeriodicWave; type?: OscillatorType; } interface PannerOptions extends AudioNodeOptions { coneInnerAngle?: number; coneOuterAngle?: number; coneOuterGain?: number; distanceModel?: DistanceModelType; maxDistance?: number; orientationX?: number; orientationY?: number; orientationZ?: number; panningModel?: PanningModelType; positionX?: number; positionY?: number; positionZ?: number; refDistance?: number; rolloffFactor?: number; } interface PaymentCurrencyAmount { currency: string; currencySystem?: string; value: string; } interface PaymentDetailsBase { displayItems?: PaymentItem[]; modifiers?: PaymentDetailsModifier[]; shippingOptions?: PaymentShippingOption[]; } interface PaymentDetailsInit extends PaymentDetailsBase { id?: string; total: PaymentItem; } interface PaymentDetailsModifier { additionalDisplayItems?: PaymentItem[]; data?: any; supportedMethods: string | string[]; total?: PaymentItem; } interface PaymentDetailsUpdate extends PaymentDetailsBase { error?: string; total?: PaymentItem; } interface PaymentItem { amount: PaymentCurrencyAmount; label: string; pending?: boolean; } interface PaymentMethodData { data?: any; supportedMethods: string | string[]; } interface PaymentOptions { requestPayerEmail?: boolean; requestPayerName?: boolean; requestPayerPhone?: boolean; requestShipping?: boolean; shippingType?: string; } interface PaymentRequestUpdateEventInit extends EventInit { } interface PaymentShippingOption { amount: PaymentCurrencyAmount; id: string; label: string; selected?: boolean; } interface Pbkdf2Params extends Algorithm { hash: HashAlgorithmIdentifier; iterations: number; salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; } interface PerformanceObserverInit { buffered?: boolean; entryTypes?: string[]; type?: string; } interface PeriodicWaveConstraints { disableNormalization?: boolean; } interface PeriodicWaveOptions extends PeriodicWaveConstraints { imag?: number[] | Float32Array; real?: number[] | Float32Array; } interface PermissionDescriptor { name: PermissionName; } interface PipeOptions { preventAbort?: boolean; preventCancel?: boolean; preventClose?: boolean; signal?: AbortSignal; } interface PointerEventInit extends MouseEventInit { height?: number; isPrimary?: boolean; pointerId?: number; pointerType?: string; pressure?: number; tangentialPressure?: number; tiltX?: number; tiltY?: number; twist?: number; width?: number; } interface PopStateEventInit extends EventInit { state?: any; } interface PositionOptions { enableHighAccuracy?: boolean; maximumAge?: number; timeout?: number; } interface PostMessageOptions { transfer?: any[]; } interface ProgressEventInit extends EventInit { lengthComputable?: boolean; loaded?: number; total?: number; } interface PromiseRejectionEventInit extends EventInit { promise: Promise; reason?: any; } interface PropertyIndexedKeyframes { composite?: CompositeOperationOrAuto | CompositeOperationOrAuto[]; easing?: string | string[]; offset?: number | (number | null)[]; [property: string]: string | string[] | number | null | (number | null)[] | undefined; } interface PublicKeyCredentialCreationOptions { attestation?: AttestationConveyancePreference; authenticatorSelection?: AuthenticatorSelectionCriteria; challenge: BufferSource; excludeCredentials?: PublicKeyCredentialDescriptor[]; extensions?: AuthenticationExtensionsClientInputs; pubKeyCredParams: PublicKeyCredentialParameters[]; rp: PublicKeyCredentialRpEntity; timeout?: number; user: PublicKeyCredentialUserEntity; } interface PublicKeyCredentialDescriptor { id: BufferSource; transports?: AuthenticatorTransport[]; type: PublicKeyCredentialType; } interface PublicKeyCredentialEntity { icon?: string; name: string; } interface PublicKeyCredentialParameters { alg: COSEAlgorithmIdentifier; type: PublicKeyCredentialType; } interface PublicKeyCredentialRequestOptions { allowCredentials?: PublicKeyCredentialDescriptor[]; challenge: BufferSource; extensions?: AuthenticationExtensionsClientInputs; rpId?: string; timeout?: number; userVerification?: UserVerificationRequirement; } interface PublicKeyCredentialRpEntity extends PublicKeyCredentialEntity { id?: string; } interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity { displayName: string; id: BufferSource; } interface PushPermissionDescriptor extends PermissionDescriptor { name: "push"; userVisibleOnly?: boolean; } interface PushSubscriptionJSON { endpoint?: string; expirationTime?: number | null; keys?: Record; } interface PushSubscriptionOptionsInit { applicationServerKey?: BufferSource | string | null; userVisibleOnly?: boolean; } interface QueuingStrategy { highWaterMark?: number; size?: QueuingStrategySizeCallback; } interface RTCAnswerOptions extends RTCOfferAnswerOptions { } interface RTCCertificateExpiration { expires?: number; } interface RTCConfiguration { bundlePolicy?: RTCBundlePolicy; certificates?: RTCCertificate[]; iceCandidatePoolSize?: number; iceServers?: RTCIceServer[]; iceTransportPolicy?: RTCIceTransportPolicy; peerIdentity?: string; rtcpMuxPolicy?: RTCRtcpMuxPolicy; } interface RTCDTMFToneChangeEventInit extends EventInit { tone: string; } interface RTCDataChannelEventInit extends EventInit { channel: RTCDataChannel; } interface RTCDataChannelInit { id?: number; maxPacketLifeTime?: number; maxRetransmits?: number; negotiated?: boolean; ordered?: boolean; priority?: RTCPriorityType; protocol?: string; } interface RTCDtlsFingerprint { algorithm?: string; value?: string; } interface RTCDtlsParameters { fingerprints?: RTCDtlsFingerprint[]; role?: RTCDtlsRole; } interface RTCErrorEventInit extends EventInit { error?: RTCError | null; } interface RTCIceCandidateAttributes extends RTCStats { addressSourceUrl?: string; candidateType?: RTCStatsIceCandidateType; ipAddress?: string; portNumber?: number; priority?: number; transport?: string; } interface RTCIceCandidateComplete { } interface RTCIceCandidateDictionary { foundation?: string; ip?: string; msMTurnSessionId?: string; port?: number; priority?: number; protocol?: RTCIceProtocol; relatedAddress?: string; relatedPort?: number; tcpType?: RTCIceTcpCandidateType; type?: RTCIceCandidateType; } interface RTCIceCandidateInit { candidate?: string; sdpMLineIndex?: number | null; sdpMid?: string | null; usernameFragment?: string; } interface RTCIceCandidatePair { local?: RTCIceCandidate; remote?: RTCIceCandidate; } interface RTCIceCandidatePairStats extends RTCStats { availableIncomingBitrate?: number; availableOutgoingBitrate?: number; bytesReceived?: number; bytesSent?: number; localCandidateId?: string; nominated?: boolean; priority?: number; readable?: boolean; remoteCandidateId?: string; roundTripTime?: number; state?: RTCStatsIceCandidatePairState; transportId?: string; writable?: boolean; } interface RTCIceGatherOptions { gatherPolicy?: RTCIceGatherPolicy; iceservers?: RTCIceServer[]; } interface RTCIceParameters { password?: string; usernameFragment?: string; } interface RTCIceServer { credential?: string | RTCOAuthCredential; credentialType?: RTCIceCredentialType; urls: string | string[]; username?: string; } interface RTCIdentityProviderOptions { peerIdentity?: string; protocol?: string; usernameHint?: string; } interface RTCInboundRTPStreamStats extends RTCRTPStreamStats { bytesReceived?: number; fractionLost?: number; jitter?: number; packetsLost?: number; packetsReceived?: number; } interface RTCMediaStreamTrackStats extends RTCStats { audioLevel?: number; echoReturnLoss?: number; echoReturnLossEnhancement?: number; frameHeight?: number; frameWidth?: number; framesCorrupted?: number; framesDecoded?: number; framesDropped?: number; framesPerSecond?: number; framesReceived?: number; framesSent?: number; remoteSource?: boolean; ssrcIds?: string[]; trackIdentifier?: string; } interface RTCOAuthCredential { accessToken: string; macKey: string; } interface RTCOfferAnswerOptions { voiceActivityDetection?: boolean; } interface RTCOfferOptions extends RTCOfferAnswerOptions { iceRestart?: boolean; offerToReceiveAudio?: boolean; offerToReceiveVideo?: boolean; } interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats { bytesSent?: number; packetsSent?: number; roundTripTime?: number; targetBitrate?: number; } interface RTCPeerConnectionIceErrorEventInit extends EventInit { errorCode: number; hostCandidate?: string; statusText?: string; url?: string; } interface RTCPeerConnectionIceEventInit extends EventInit { candidate?: RTCIceCandidate | null; url?: string | null; } interface RTCRTPStreamStats extends RTCStats { associateStatsId?: string; codecId?: string; firCount?: number; isRemote?: boolean; mediaTrackId?: string; mediaType?: string; nackCount?: number; pliCount?: number; sliCount?: number; ssrc?: string; transportId?: string; } interface RTCRtcpFeedback { parameter?: string; type?: string; } interface RTCRtcpParameters { cname?: string; reducedSize?: boolean; } interface RTCRtpCapabilities { codecs: RTCRtpCodecCapability[]; headerExtensions: RTCRtpHeaderExtensionCapability[]; } interface RTCRtpCodecCapability { channels?: number; clockRate: number; mimeType: string; sdpFmtpLine?: string; } interface RTCRtpCodecParameters { channels?: number; clockRate: number; mimeType: string; payloadType: number; sdpFmtpLine?: string; } interface RTCRtpCodingParameters { rid?: string; } interface RTCRtpContributingSource { audioLevel?: number; source: number; timestamp: number; } interface RTCRtpDecodingParameters extends RTCRtpCodingParameters { } interface RTCRtpEncodingParameters extends RTCRtpCodingParameters { active?: boolean; codecPayloadType?: number; dtx?: RTCDtxStatus; maxBitrate?: number; maxFramerate?: number; priority?: RTCPriorityType; ptime?: number; scaleResolutionDownBy?: number; } interface RTCRtpFecParameters { mechanism?: string; ssrc?: number; } interface RTCRtpHeaderExtension { kind?: string; preferredEncrypt?: boolean; preferredId?: number; uri?: string; } interface RTCRtpHeaderExtensionCapability { uri?: string; } interface RTCRtpHeaderExtensionParameters { encrypted?: boolean; id: number; uri: string; } interface RTCRtpParameters { codecs: RTCRtpCodecParameters[]; headerExtensions: RTCRtpHeaderExtensionParameters[]; rtcp: RTCRtcpParameters; } interface RTCRtpReceiveParameters extends RTCRtpParameters { encodings: RTCRtpDecodingParameters[]; } interface RTCRtpRtxParameters { ssrc?: number; } interface RTCRtpSendParameters extends RTCRtpParameters { degradationPreference?: RTCDegradationPreference; encodings: RTCRtpEncodingParameters[]; transactionId: string; } interface RTCRtpSynchronizationSource extends RTCRtpContributingSource { voiceActivityFlag?: boolean; } interface RTCRtpTransceiverInit { direction?: RTCRtpTransceiverDirection; sendEncodings?: RTCRtpEncodingParameters[]; streams?: MediaStream[]; } interface RTCRtpUnhandled { muxId?: string; payloadType?: number; ssrc?: number; } interface RTCSessionDescriptionInit { sdp?: string; type: RTCSdpType; } interface RTCSrtpKeyParam { keyMethod?: string; keySalt?: string; lifetime?: string; mkiLength?: number; mkiValue?: number; } interface RTCSrtpSdesParameters { cryptoSuite?: string; keyParams?: RTCSrtpKeyParam[]; sessionParams?: string[]; tag?: number; } interface RTCSsrcRange { max?: number; min?: number; } interface RTCStats { id: string; timestamp: number; type: RTCStatsType; } interface RTCStatsEventInit extends EventInit { report: RTCStatsReport; } interface RTCStatsReport { } interface RTCTrackEventInit extends EventInit { receiver: RTCRtpReceiver; streams?: MediaStream[]; track: MediaStreamTrack; transceiver: RTCRtpTransceiver; } interface RTCTransportStats extends RTCStats { activeConnection?: boolean; bytesReceived?: number; bytesSent?: number; localCertificateId?: string; remoteCertificateId?: string; rtcpTransportStatsId?: string; selectedCandidatePairId?: string; } interface RegistrationOptions { scope?: string; type?: WorkerType; updateViaCache?: ServiceWorkerUpdateViaCache; } interface RequestInit { /** * A BodyInit object or null to set request's body. */ body?: BodyInit | null; /** * A string indicating how the request will interact with the browser's cache to set request's cache. */ cache?: RequestCache; /** * A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials. */ credentials?: RequestCredentials; /** * A Headers object, an object literal, or an array of two-item arrays to set request's headers. */ headers?: HeadersInit; /** * A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */ integrity?: string; /** * A boolean to set request's keepalive. */ keepalive?: boolean; /** * A string to set request's method. */ method?: string; /** * A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */ mode?: RequestMode; /** * A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. */ redirect?: RequestRedirect; /** * A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */ referrer?: string; /** * A referrer policy to set request's referrerPolicy. */ referrerPolicy?: ReferrerPolicy; /** * An AbortSignal to set request's signal. */ signal?: AbortSignal | null; /** * Can only be null. Used to disassociate request from any Window. */ window?: any; } interface ResponseInit { headers?: HeadersInit; status?: number; statusText?: string; } interface RsaHashedImportParams extends Algorithm { hash: HashAlgorithmIdentifier; } interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { hash: KeyAlgorithm; } interface RsaHashedKeyGenParams extends RsaKeyGenParams { hash: HashAlgorithmIdentifier; } interface RsaKeyAlgorithm extends KeyAlgorithm { modulusLength: number; publicExponent: BigInteger; } interface RsaKeyGenParams extends Algorithm { modulusLength: number; publicExponent: BigInteger; } interface RsaOaepParams extends Algorithm { label?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; } interface RsaOtherPrimesInfo { d?: string; r?: string; t?: string; } interface RsaPssParams extends Algorithm { saltLength: number; } interface SVGBoundingBoxOptions { clipped?: boolean; fill?: boolean; markers?: boolean; stroke?: boolean; } interface ScopedCredentialDescriptor { id: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null; transports?: Transport[]; type: ScopedCredentialType; } interface ScopedCredentialOptions { excludeList?: ScopedCredentialDescriptor[]; extensions?: WebAuthnExtensions; rpId?: string; timeoutSeconds?: number; } interface ScopedCredentialParameters { algorithm: string | Algorithm; type: ScopedCredentialType; } interface ScrollIntoViewOptions extends ScrollOptions { block?: ScrollLogicalPosition; inline?: ScrollLogicalPosition; } interface ScrollOptions { behavior?: ScrollBehavior; } interface ScrollToOptions extends ScrollOptions { left?: number; top?: number; } interface SecurityPolicyViolationEventInit extends EventInit { blockedURI?: string; columnNumber?: number; documentURI?: string; effectiveDirective?: string; lineNumber?: number; originalPolicy?: string; referrer?: string; sourceFile?: string; statusCode?: number; violatedDirective?: string; } interface ServiceWorkerMessageEventInit extends EventInit { data?: any; lastEventId?: string; origin?: string; ports?: MessagePort[] | null; source?: ServiceWorker | MessagePort | null; } interface ShadowRootInit { delegatesFocus?: boolean; mode: ShadowRootMode; } interface StereoPannerOptions extends AudioNodeOptions { pan?: number; } interface StorageEstimate { quota?: number; usage?: number; } interface StorageEventInit extends EventInit { key?: string | null; newValue?: string | null; oldValue?: string | null; storageArea?: Storage | null; url?: string; } interface StoreExceptionsInformation extends ExceptionInformation { detailURI?: string | null; explanationString?: string | null; siteName?: string | null; } interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation { arrayOfDomainStrings?: string[]; } interface TextDecodeOptions { stream?: boolean; } interface TextDecoderOptions { fatal?: boolean; ignoreBOM?: boolean; } interface TextEncoderEncodeIntoResult { read?: number; written?: number; } interface TouchEventInit extends EventModifierInit { changedTouches?: Touch[]; targetTouches?: Touch[]; touches?: Touch[]; } interface TouchInit { altitudeAngle?: number; azimuthAngle?: number; clientX?: number; clientY?: number; force?: number; identifier: number; pageX?: number; pageY?: number; radiusX?: number; radiusY?: number; rotationAngle?: number; screenX?: number; screenY?: number; target: EventTarget; touchType?: TouchType; } interface TrackEventInit extends EventInit { track?: VideoTrack | AudioTrack | TextTrack | null; } interface Transformer { flush?: TransformStreamDefaultControllerCallback; readableType?: undefined; start?: TransformStreamDefaultControllerCallback; transform?: TransformStreamDefaultControllerTransformCallback; writableType?: undefined; } interface TransitionEventInit extends EventInit { elapsedTime?: number; propertyName?: string; pseudoElement?: string; } interface UIEventInit extends EventInit { detail?: number; view?: Window | null; } interface ULongRange { max?: number; min?: number; } interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: ReadableStreamErrorCallback; pull?: ReadableByteStreamControllerCallback; start?: ReadableByteStreamControllerCallback; type: "bytes"; } interface UnderlyingSink { abort?: WritableStreamErrorCallback; close?: WritableStreamDefaultControllerCloseCallback; start?: WritableStreamDefaultControllerStartCallback; type?: undefined; write?: WritableStreamDefaultControllerWriteCallback; } interface UnderlyingSource { cancel?: ReadableStreamErrorCallback; pull?: ReadableStreamDefaultControllerCallback; start?: ReadableStreamDefaultControllerCallback; type?: undefined; } interface VRDisplayEventInit extends EventInit { display: VRDisplay; reason?: VRDisplayEventReason; } interface VRLayer { leftBounds?: number[] | Float32Array | null; rightBounds?: number[] | Float32Array | null; source?: HTMLCanvasElement | null; } interface VRStageParameters { sittingToStandingTransform?: Float32Array; sizeX?: number; sizeY?: number; } interface WaveShaperOptions extends AudioNodeOptions { curve?: number[] | Float32Array; oversample?: OverSampleType; } interface WebAuthnExtensions { } interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; depth?: boolean; desynchronized?: boolean; failIfMajorPerformanceCaveat?: boolean; powerPreference?: WebGLPowerPreference; premultipliedAlpha?: boolean; preserveDrawingBuffer?: boolean; stencil?: boolean; } interface WebGLContextEventInit extends EventInit { statusMessage?: string; } interface WheelEventInit extends MouseEventInit { deltaMode?: number; deltaX?: number; deltaY?: number; deltaZ?: number; } interface WorkerOptions { credentials?: RequestCredentials; name?: string; type?: WorkerType; } interface WorkletOptions { credentials?: RequestCredentials; } interface txAuthGenericArg { content: ArrayBuffer; contentType: string; } interface EventListener { (evt: Event): void; } type XPathNSResolver = ((prefix: string | null) => string | null) | { lookupNamespaceURI(prefix: string | null): string | null; }; /** The ANGLE_instanced_arrays extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. */ interface ANGLE_instanced_arrays { drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void; drawElementsInstancedANGLE(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, primcount: GLsizei): void; vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void; readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum; } /** A controller object that allows you to abort one or more DOM requests as and when desired. */ interface AbortController { /** * Returns the AbortSignal object associated with this object. */ readonly signal: AbortSignal; /** * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. */ abort(): void; } declare var AbortController: { prototype: AbortController; new(): AbortController; }; interface AbortSignalEventMap { "abort": Event; } /** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */ interface AbortSignal extends EventTarget { /** * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */ readonly aborted: boolean; onabort: ((this: AbortSignal, ev: Event) => any) | null; addEventListener(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var AbortSignal: { prototype: AbortSignal; new(): AbortSignal; }; interface AbstractRange { /** * Returns true if range is collapsed, and false otherwise. */ readonly collapsed: boolean; /** * Returns range's end node. */ readonly endContainer: Node; /** * Returns range's end offset. */ readonly endOffset: number; /** * Returns range's start node. */ readonly startContainer: Node; /** * Returns range's start offset. */ readonly startOffset: number; } declare var AbstractRange: { prototype: AbstractRange; new(): AbstractRange; }; interface AbstractWorkerEventMap { "error": ErrorEvent; } interface AbstractWorker { onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null; addEventListener(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } interface AesCfbParams extends Algorithm { iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; } interface AesCmacParams extends Algorithm { length: number; } /** A node able to provide real-time frequency and time-domain analysis information. It is an AudioNode that passes the audio stream unchanged from the input to the output, but allows you to take the generated data, process it, and create audio visualizations. */ interface AnalyserNode extends AudioNode { fftSize: number; readonly frequencyBinCount: number; maxDecibels: number; minDecibels: number; smoothingTimeConstant: number; getByteFrequencyData(array: Uint8Array): void; getByteTimeDomainData(array: Uint8Array): void; getFloatFrequencyData(array: Float32Array): void; getFloatTimeDomainData(array: Float32Array): void; } declare var AnalyserNode: { prototype: AnalyserNode; new(context: BaseAudioContext, options?: AnalyserOptions): AnalyserNode; }; interface Animatable { animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation; getAnimations(): Animation[]; } interface AnimationEventMap { "cancel": AnimationPlaybackEvent; "finish": AnimationPlaybackEvent; } interface Animation extends EventTarget { currentTime: number | null; effect: AnimationEffect | null; readonly finished: Promise; id: string; oncancel: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null; onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null; readonly pending: boolean; readonly playState: AnimationPlayState; playbackRate: number; readonly ready: Promise; startTime: number | null; timeline: AnimationTimeline | null; cancel(): void; finish(): void; pause(): void; play(): void; reverse(): void; updatePlaybackRate(playbackRate: number): void; addEventListener(type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var Animation: { prototype: Animation; new(effect?: AnimationEffect | null, timeline?: AnimationTimeline | null): Animation; }; interface AnimationEffect { getComputedTiming(): ComputedEffectTiming; getTiming(): EffectTiming; updateTiming(timing?: OptionalEffectTiming): void; } declare var AnimationEffect: { prototype: AnimationEffect; new(): AnimationEffect; }; /** Events providing information related to animations. */ interface AnimationEvent extends Event { readonly animationName: string; readonly elapsedTime: number; readonly pseudoElement: string; } declare var AnimationEvent: { prototype: AnimationEvent; new(type: string, animationEventInitDict?: AnimationEventInit): AnimationEvent; }; interface AnimationFrameProvider { cancelAnimationFrame(handle: number): void; requestAnimationFrame(callback: FrameRequestCallback): number; } interface AnimationPlaybackEvent extends Event { readonly currentTime: number | null; readonly timelineTime: number | null; } declare var AnimationPlaybackEvent: { prototype: AnimationPlaybackEvent; new(type: string, eventInitDict?: AnimationPlaybackEventInit): AnimationPlaybackEvent; }; interface AnimationTimeline { readonly currentTime: number | null; } declare var AnimationTimeline: { prototype: AnimationTimeline; new(): AnimationTimeline; }; interface ApplicationCacheEventMap { "cached": Event; "checking": Event; "downloading": Event; "error": Event; "noupdate": Event; "obsolete": Event; "progress": ProgressEvent; "updateready": Event; } interface ApplicationCache extends EventTarget { /** @deprecated */ oncached: ((this: ApplicationCache, ev: Event) => any) | null; /** @deprecated */ onchecking: ((this: ApplicationCache, ev: Event) => any) | null; /** @deprecated */ ondownloading: ((this: ApplicationCache, ev: Event) => any) | null; /** @deprecated */ onerror: ((this: ApplicationCache, ev: Event) => any) | null; /** @deprecated */ onnoupdate: ((this: ApplicationCache, ev: Event) => any) | null; /** @deprecated */ onobsolete: ((this: ApplicationCache, ev: Event) => any) | null; /** @deprecated */ onprogress: ((this: ApplicationCache, ev: ProgressEvent) => any) | null; /** @deprecated */ onupdateready: ((this: ApplicationCache, ev: Event) => any) | null; /** @deprecated */ readonly status: number; /** @deprecated */ abort(): void; /** @deprecated */ swapCache(): void; /** @deprecated */ update(): void; readonly CHECKING: number; readonly DOWNLOADING: number; readonly IDLE: number; readonly OBSOLETE: number; readonly UNCACHED: number; readonly UPDATEREADY: number; addEventListener(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var ApplicationCache: { prototype: ApplicationCache; new(): ApplicationCache; readonly CHECKING: number; readonly DOWNLOADING: number; readonly IDLE: number; readonly OBSOLETE: number; readonly UNCACHED: number; readonly UPDATEREADY: number; }; /** A DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types. */ interface Attr extends Node { readonly localName: string; readonly name: string; readonly namespaceURI: string | null; readonly ownerElement: Element | null; readonly prefix: string | null; readonly specified: boolean; value: string; } declare var Attr: { prototype: Attr; new(): Attr; }; /** A short audio asset residing in memory, created from an audio file using the AudioContext.decodeAudioData() method, or from raw data using AudioContext.createBuffer(). Once put into an AudioBuffer, the audio can then be played by being passed into an AudioBufferSourceNode. */ interface AudioBuffer { readonly duration: number; readonly length: number; readonly numberOfChannels: number; readonly sampleRate: number; copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void; copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void; getChannelData(channel: number): Float32Array; } declare var AudioBuffer: { prototype: AudioBuffer; new(options: AudioBufferOptions): AudioBuffer; }; /** An AudioScheduledSourceNode which represents an audio source consisting of in-memory audio data, stored in an AudioBuffer. It's especially useful for playing back audio which has particularly stringent timing accuracy requirements, such as for sounds that must match a specific rhythm and can be kept in memory rather than being played from disk or the network. */ interface AudioBufferSourceNode extends AudioScheduledSourceNode { buffer: AudioBuffer | null; readonly detune: AudioParam; loop: boolean; loopEnd: number; loopStart: number; readonly playbackRate: AudioParam; start(when?: number, offset?: number, duration?: number): void; addEventListener(type: K, listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var AudioBufferSourceNode: { prototype: AudioBufferSourceNode; new(context: BaseAudioContext, options?: AudioBufferSourceOptions): AudioBufferSourceNode; }; /** An audio-processing graph built from audio modules linked together, each represented by an AudioNode. */ interface AudioContext extends BaseAudioContext { readonly baseLatency: number; readonly outputLatency: number; close(): Promise; createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode; createMediaStreamDestination(): MediaStreamAudioDestinationNode; createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode; createMediaStreamTrackSource(mediaStreamTrack: MediaStreamTrack): MediaStreamTrackAudioSourceNode; getOutputTimestamp(): AudioTimestamp; resume(): Promise; suspend(): Promise; addEventListener(type: K, listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var AudioContext: { prototype: AudioContext; new(contextOptions?: AudioContextOptions): AudioContext; }; /** AudioDestinationNode has no output (as it is the output, no more AudioNode can be linked after it in the audio graph) and one input. The number of channels in the input must be between 0 and the maxChannelCount value or an exception is raised. */ interface AudioDestinationNode extends AudioNode { readonly maxChannelCount: number; } declare var AudioDestinationNode: { prototype: AudioDestinationNode; new(): AudioDestinationNode; }; /** The position and orientation of the unique person listening to the audio scene, and is used in audio spatialization. All PannerNodes spatialize in relation to the AudioListener stored in the BaseAudioContext.listener attribute. */ interface AudioListener { readonly forwardX: AudioParam; readonly forwardY: AudioParam; readonly forwardZ: AudioParam; readonly positionX: AudioParam; readonly positionY: AudioParam; readonly positionZ: AudioParam; readonly upX: AudioParam; readonly upY: AudioParam; readonly upZ: AudioParam; /** @deprecated */ setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void; /** @deprecated */ setPosition(x: number, y: number, z: number): void; } declare var AudioListener: { prototype: AudioListener; new(): AudioListener; }; /** A generic interface for representing an audio processing module. Examples include: */ interface AudioNode extends EventTarget { channelCount: number; channelCountMode: ChannelCountMode; channelInterpretation: ChannelInterpretation; readonly context: BaseAudioContext; readonly numberOfInputs: number; readonly numberOfOutputs: number; connect(destinationNode: AudioNode, output?: number, input?: number): AudioNode; connect(destinationParam: AudioParam, output?: number): void; disconnect(): void; disconnect(output: number): void; disconnect(destinationNode: AudioNode): void; disconnect(destinationNode: AudioNode, output: number): void; disconnect(destinationNode: AudioNode, output: number, input: number): void; disconnect(destinationParam: AudioParam): void; disconnect(destinationParam: AudioParam, output: number): void; } declare var AudioNode: { prototype: AudioNode; new(): AudioNode; }; /** The Web Audio API's AudioParam interface represents an audio-related parameter, usually a parameter of an AudioNode (such as GainNode.gain). */ interface AudioParam { automationRate: AutomationRate; readonly defaultValue: number; readonly maxValue: number; readonly minValue: number; value: number; cancelAndHoldAtTime(cancelTime: number): AudioParam; cancelScheduledValues(cancelTime: number): AudioParam; exponentialRampToValueAtTime(value: number, endTime: number): AudioParam; linearRampToValueAtTime(value: number, endTime: number): AudioParam; setTargetAtTime(target: number, startTime: number, timeConstant: number): AudioParam; setValueAtTime(value: number, startTime: number): AudioParam; setValueCurveAtTime(values: number[] | Float32Array, startTime: number, duration: number): AudioParam; } declare var AudioParam: { prototype: AudioParam; new(): AudioParam; }; interface AudioParamMap { forEach(callbackfn: (value: AudioParam, key: string, parent: AudioParamMap) => void, thisArg?: any): void; } declare var AudioParamMap: { prototype: AudioParamMap; new(): AudioParamMap; }; /** The Web Audio API events that occur when a ScriptProcessorNode input buffer is ready to be processed. */ interface AudioProcessingEvent extends Event { readonly inputBuffer: AudioBuffer; readonly outputBuffer: AudioBuffer; readonly playbackTime: number; } declare var AudioProcessingEvent: { prototype: AudioProcessingEvent; new(type: string, eventInitDict: AudioProcessingEventInit): AudioProcessingEvent; }; interface AudioScheduledSourceNodeEventMap { "ended": Event; } interface AudioScheduledSourceNode extends AudioNode { onended: ((this: AudioScheduledSourceNode, ev: Event) => any) | null; start(when?: number): void; stop(when?: number): void; addEventListener(type: K, listener: (this: AudioScheduledSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AudioScheduledSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var AudioScheduledSourceNode: { prototype: AudioScheduledSourceNode; new(): AudioScheduledSourceNode; }; /** A single audio track from one of the HTML media elements,