Back to Samples

WebRTC samples Munge SDP

src/content/peerconnection/munge-sdp/index.html

latest1.0 KB
Original Source

WebRTC samples Munge SDP

Get mediaCreate peer connectionCreate offerSet offerCreate answerSet answerHang up

Note: SDP "munging", i.e. modifying the SDP between createOffer/createAnswer and setLocalDescription is a nonstandard feature which may not work as expected. While some browsers support some modifications, the W3C standard forbids it.

Local

Offer SDP

Remote

Answer SDP

View the console to see logging.

The RTCPeerConnection objects pc1 and pc2 are in global scope, so you can inspect them in the console as well.

For more information about RTCPeerConnection, see Getting Started With WebRTC.

View source on GitHub