Back to Samples

WebRTC samples Peer connection

src/content/peerconnection/change-codecs/index.html

latest908 B
Original Source

WebRTC samplesPeer connection

This sample shows how to setup a connection between two peers using RTCPeerConnection and choose the preferred video codec to use (when that functionality is available.)

StartCallHang Up

Codec preferences:Default

View the console to see logging. The MediaStream object localStream, and 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