This is an experimental technologyCheck 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 | Status | Comment |
Audio Output Devices APIThe definition of 'sinkId' in that specification. | Candidate Recommendation | Initial definition. Older versions of this spec were called "Media Capture Output". |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Chrome
Full support 49 |
Edge
Full support 17 |
Firefox
? |
IE
No support No |
Opera
Full support Yes |
Safari
? |
WebView Android
Full support 49 |
Chrome Android
Full support 49 |
Firefox Android
? |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
Full support 5.0 |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Experimental. Expect behavior to change in the future.'
- Experimental. Expect behavior to change in the future.
HTMLMediaElement.sinkId by Mozilla Contributors is licensed under CC-BY-SA 2.5.