-
Notifications
You must be signed in to change notification settings - Fork 22.5k
/
index.md
48 lines (32 loc) · 1.25 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
title: AudioSinkInfo
slug: Web/API/AudioSinkInfo
page-type: web-api-interface
status:
- experimental
browser-compat: api.AudioSinkInfo
---
{{APIRef("Web Audio API")}}{{SeeCompatTable}}
The **`AudioSinkInfo`** interface of the {{domxref("Web Audio API", "Web Audio API", "", "nocode")}} represents information describing an {{domxref("AudioContext")}}'s sink ID, retrieved via {{domxref("AudioContext.sinkId")}}.
{{InheritanceDiagram}}
## Instance properties
- {{domxref("AudioSinkInfo.type", "type")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : Returns the type of the audio output device.
## Examples
If a new {{domxref("AudioContext")}} is created with a `sinkId` value of `{ type: 'none' }`, calling {{domxref("AudioContext.sinkId")}} later in the code will return a `AudioSinkInfo` object containing `type: 'none'`. This is currently the only value available.
```js
audioCtx = new window.AudioContext({
sinkId: { type: "none" },
});
// ...
audioCtx.sinkId;
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- [SetSinkId test example](https://set-sink-id.glitch.me/)
- {{domxref("AudioContext.setSinkId()")}}
- {{domxref("AudioContext.sinkId")}}
- {{domxref("AudioContext/sinkchange_event", "sinkchange")}}