AudioContext
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;
addEventListener<K extends keyof BaseAudioContextEventMap>(
type: K,
listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;close(): Promise<void>;
createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
createMediaStreamDestination(): MediaStreamAudioDestinationNode;
createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;
getOutputTimestamp(): AudioTimestamp;
removeEventListener<K extends keyof BaseAudioContextEventMap>(
type: K,
listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;resume(): Promise<void>;
suspend(): Promise<void>;
}var AudioContext: {
prototype: AudioContext;
new (contextOptions?: AudioContextOptions): AudioContext;
};§Extends
§Methods
§
addEventListener<K extends keyof BaseAudioContextEventMap>(
[src]type: K,
listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode
[src]§
createMediaStreamDestination(): MediaStreamAudioDestinationNode
[src]§
createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode
[src]§
getOutputTimestamp(): AudioTimestamp
[src]§
removeEventListener<K extends keyof BaseAudioContextEventMap>(
[src]type: K,
listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void§
removeEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void