HTMLMediaElement.sinkId
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The HTMLMediaElement.sinkId
read-only property returns a DOMString
that is the unique ID of the audio device delivering output. If it is using the user agent default, it returns an empty string. This ID should be one of the MediaDeviceInfo.deviceId
values returned from MediaDevices.enumerateDevices()
, id-multimedia
, or id-communications
.
Syntax
var sinkId = HTMLMediaElement.sinkId
Specifications
Specification |
---|
Audio Output Devices API # dom-htmlmediaelement-sinkid |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
sinkId |
49 |
17 |
No |
No |
36 |
No |
No |
49 |
No |
? |
No |
5.0 |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/sinkId