AudioSinkInfo
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
TheAudioSinkInfo interface of theWeb Audio API represents information describing anAudioContext's sink ID, retrieved viaAudioContext.sinkId.
In this article
Instance properties
typeRead onlyExperimentalReturns the type of the audio output device.
Examples
If a newAudioContext is created with asinkId value of{ type: 'none' }, callingAudioContext.sinkId later in the code will return anAudioSinkInfo object containingtype: 'none'. This is currently the only value available.
js
audioCtx = new window.AudioContext({ sinkId: { type: "none" },});// …audioCtx.sinkId;Specifications
| Specification |
|---|
| Web Audio API> # AudioSinkInfo> |