W3cubDocs

/Web APIs

HTMLMediaElement: sinkId property

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The sinkId read-only property of the HTMLMediaElement interface returns a string that is the unique ID of the device to be used for playing audio output.

This ID should be one of the MediaDeviceInfo.deviceId values returned from MediaDevices.enumerateDevices(). If the user agent default device is being used, it returns an empty string.

Value

A string indicating the current audio output device, or the empty string if the default user agent output device is being used.

Security requirements

Access to the property is subject to the following constraints:

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet WebView Android WebView on iOS
sinkId 49 17 116 36 18.4
NoNot available due to a limitation in Android, see bug 41276355.
NoNot available due to a limitation in Android, see bug 1473346.
NoNot available due to a limitation in Android, see bug 41276355.
18.4
NoNot available due to a limitation in Android, see bug 41276355.
NoNot available due to a limitation in Android, see bug 41276355.
18.4

See also

© 2005–2025 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