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

Specification
Audio Output Devices API
# dom-htmlmediaelement-sinkid

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
Chrome – Full support
Chrome 49 (Release date: 2016-03-02)
footnote Full support
Edge – Full support
Edge 17 (Release date: 2018-04-30)
footnote Full support
Firefox – Full support
Firefox 116 (Release date: 2023-08-01)
footnote Full support
Opera – Full support
Opera 36 (Release date: 2016-03-15)
footnote Full support
Safari – Full support
Safari 18.4 (Release date: 2025-03-31)
footnote Full support
Chrome Android – No support
Chrome Android
footnote
footnote Not available due to a limitation in Android, see bug 41276355.
Firefox for Android – No support
Firefox for Android
footnote
footnote Not available due to a limitation in Android, see bug 1473346.
Opera Android – No support
Opera Android
footnote
footnote Not available due to a limitation in Android, see bug 41276355.
Safari on iOS – Full support
Safari on iOS 18.4 (Release date: 2025-03-31)
footnote Full support
Samsung Internet – No support
Samsung Internet
footnote
footnote Not available due to a limitation in Android, see bug 41276355.
WebView Android – No support
WebView Android
footnote
footnote Not available due to a limitation in Android, see bug 41276355.
WebView on iOS – Full support
WebView on iOS 18.4 (Release date: 2025-03-31)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

See also