MID denotes the media identification tag in RTP.
It is defined and used as a header extension in RFC 8843 section 16.2.
MID, along with RID and RRID, are used to associate between low-level RTP concepts like synchronization source (SSRC) and higher-level WebRTC objects such as RtpSender and RtpReceiver.
These identifiers are important to be able to demultiplex RTP bundling, a common mechanism used in WebRTC sessions.
When RTP packets are received, WebRTC needs to decide to which object/stream to associate the incoming packet. This is done using roughly the following decision diagram:
All header extensions used by MID, RID and RRID have the same basic structure and contain an ASCII string with the MID/RID/RRID value in it.