Early media is common in telephony but long anticipated in WebRTC. A common use case of early media is for playing announcements or music before the call was connected.
The issue with early media is that it requires sending the media before an SDP answer was sent as response to an SDP offer.
In the last W3C discussion this topic was concluded.
Applications that require connecting with existing telephony networks or playing early media as part of their pure WebRTC service will now be able to do this in a standard way.
This capability is now in the specification.
There has long been discussion about how to handle what is called “early media” in the telephony world, media that arrives before an SDP negotiation has completed.
This can happen in particular when the offer has been sent but media arrives before the answer.
The decision in Seattle was as follows:
- If the media that arrives is inconsistent with the current offer/answer, it will be dropped
- If the media is otherwise acceptable and arrives before the answer, the media will be available only if there is an RTCRtpReceiver object to receive it
In our update about transceivers we discussed the creation of RTCRtpReceiver by calling createRtpTransceiver(). Through this, early media is now possible as well.