The process to upstream an RTCPeerConnection implementation, based on OpenWebRTC, to WebKit is under way. We are starting off with the platform generic additions to WebCore (see previous blog post). Before we can move on to the actual OpenWebRTC WebRTC backend we need to bump WebKitGTK+’s GStreamer version to 1.6. That work is ongoing and you can read about it here.
But if you would like to test it before it lands in upstream WebKit you can. The WebKit fork, where we keep our work-in-progress code, is publicly available on github. We also provide some simple test applications and I will show you some videos of two of them in action below. If you would like to run them yourself, go to our test repository on github and follow the instruction on how to run the “Peer-to-peer Example”. Those steps also contain build instructions, so when completed, you can also run the other test applications.
The Peer-to-peer example is a simple video chat application that connects two browsers. The example code comes with a server that acts both as a web server, to serve the application itself, as well as a signaling server, to exchange messages such as SDPs and ICE candidates between the clients. Setting up a video call between the WebKitGTK+ MiniBrowser and Chrome looks something like this:
If you do not have two webcams, you can try the “One tab p2p” example instead. It uses different setup methods to make calls internally in one browser tab between two RTCPeerConnection objects. Take a look at the source code and compare the simple promise chain and the more complicated setup with the callback based API. The video below shows how media can be set up in one direction at a time compared to everything being done in a single offer/answer dialog as in the previous example:
We will provide more information about the upstream as we make progress. The next step is the infrastructure to run and test createOffer().