BaseAudioContext: destination Eigenschaft

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.

Die destination-Eigenschaft der BaseAudioContext-Schnittstelle gibt einen AudioDestinationNode zurück, der das endgültige Ziel aller Audios im Kontext darstellt. Es stellt oft ein tatsächliches Audio-Wiedergabegerät wie die Lautsprecher Ihres Geräts dar.

Wert

Beispiele

Hinweis: Für vollständigere angewandte Beispiele/Informationen, sehen Sie sich unser Voice-change-O-matic Demo an (siehe app.js Zeilen 108–193 für relevanten Code).

js
const audioCtx = new AudioContext();
// Older webkit/blink browsers require a prefix

const oscillatorNode = audioCtx.createOscillator();
const gainNode = audioCtx.createGain();

oscillatorNode.connect(gainNode);
gainNode.connect(audioCtx.destination);

Spezifikationen

Specification
Web Audio API
# dom-baseaudiocontext-destination

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
destination

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

Siehe auch