Skip to main content

3.4.1. RtpTransceivers

3.4.1. RtpTransceivers

RtpTransceivers allow the application to control the RTP media associated with one "m=" section. Each RtpTransceiver has an RtpSender and an RtpReceiver, which an application can use to control the sending and receiving of RTP media. The application may also modify the RtpTransceiver directly, for instance, by stopping it.

RtpTransceivers generally have a 1:1 mapping with "m=" sections, although there may be more RtpTransceivers than "m=" sections when RtpTransceivers are created but not yet associated with an "m=" section, or if RtpTransceivers have been stopped and disassociated from "m=" sections. An RtpTransceiver is said to be associated with an "m=" section if its media identification (mid) property is non-null; otherwise, it is said to be disassociated. The associated "m=" section is determined using a mapping between transceivers and "m=" section indices, formed when creating an offer or applying a remote offer.

An RtpTransceiver is never associated with more than one "m=" section, and once a session description is applied, an "m=" section is always associated with exactly one RtpTransceiver. However, in certain cases where an "m=" section has been rejected, as discussed in Section 5.2.2 below, that "m=" section will be "recycled" and associated with a new RtpTransceiver with a new MID value.

RtpTransceivers can be created explicitly by the application or implicitly by calling setRemoteDescription with an offer that adds new "m=" sections.