RTCIceCandidate: sdpMid property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2017.

The read-only property sdpMid on the RTCIceCandidate interface returns a string specifying the media stream identification tag of the media component with which the candidate is associated. This ID uniquely identifies a given stream for the component with which the candidate is associated.

This property can be configured by specifying the value of the sdpMid property in the candidateInfo options object that is passed to the RTCIceCandidate() constructor. If you call the constructor with an m-line string instead of the options object, the value of sdpMid is extracted from the specified candidate m-line string.

Value

A string which uniquely identifies the source media component from which the candidate draws data, or null if no such association exists for the candidate.

Note: Attempting to add a candidate (using addIceCandidate()) that has a value of null for both sdpMid and sdpMLineIndex will throw a TypeError exception.

Specifications

Specification
WebRTC: Real-Time Communication in Browsers
# dom-rtcicecandidate-sdpmid

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
sdpMid
Chrome – Full support
Chrome 23 (Release date: 2012-11-06)
footnote Full support
Edge – Full support
Edge 15 (Release date: 2017-04-05)
footnote Full support
Firefox – Full support
Firefox 22 (Release date: 2013-06-25)
footnote
footnote Before Firefox 126, the property was not read-only.
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 11 (Release date: 2017-09-19)
footnote Full support
Chrome Android – Full support
Chrome Android 25 (Release date: 2013-02-27)
footnote Full support
Firefox for Android – Full support
Firefox for Android 24 (Release date: 2013-09-17)
footnote
footnote Before Firefox 126, the property was not read-only.
Opera Android – Full support
Opera Android 14 (Release date: 2013-05-21)
footnote Full support
Safari on iOS – Full support
Safari on iOS 11 (Release date: 2017-09-19)
footnote Full support
Samsung Internet – Full support
Samsung Internet 1.5 (Release date: 2013-09-25)
footnote Full support
WebView Android – Full support
WebView Android 4.4 (Release date: 2013-12-09)
footnote Full support
WebView on iOS – Full support
WebView on iOS 11 (Release date: 2017-09-19)
footnote Full support

Legend

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

Full support
Full support
See implementation notes.