📜 ⬆️ ⬇️

What is “under the hood” of Skype video calls on Facebook

Facebook and Skype launched Facebook video calls yesterday that allow users to call and see each other right on facebook.com. We at Skype are very pleased with this product. We believe that users will like its ease of use. It combines the quality and scale of Skype video calls with the social interaction of Facebook in such a way that it gives us a very powerful combination.

Without a doubt, techies around the world are interested to know how we did it. How did we integrate Skype into Facebook? Can this solution scale? Is the Skype client used?


It all starts on facebook.com. When viewing a profile page or chatting, users will see buttons that allow them to start a video conversation with their friends. These buttons are displayed as part of the Facebook webpage. When a user clicks on the “Call” button, the page checks for a Skype video call plug-in, which is an optimized version of Skype’s “desktop” program and makes it possible to make video calls. If Skype plug-in is not found, the user will be prompted to install it. Facebook servers interact with Skype technology through our own REST API, which we developed for this. Using this API, Facebook automatically creates an anonymous Skype account for the first time caller (or call recipient) “caller”. Our REST API also allows Facebook servers to obtain credentials for a Skype user using an anonymous account.
')
The plugin is essentially a miniature version of the Skype client. We optimized the Skype client for Facebook by removing most of the user interface and many features that are not needed for the Facebook application (for example, instant messaging in Skype). Our plugin consists of two parts. The first is the runtime, which is a miniature standalone Skype client, and the second is the browser plugin itself. The runtime provides several simple APIs through the RPC mechanism, and a browser plugin provides these APIs with JavaScript access to facebook.com. Despite its compact size and simplified user interface, the runtime is a true Skype in everything that matters in this case. It has everything that makes Skype so cool: our P2P technology, our firewall bypass and NAT protocol, our video and audio codecs, our media processing engine are all in place.

As soon as the plugin is downloaded and installed, and the subscriber logs in anonymously to the system (a process that is automatic, invisible to the user), a handshake occurs through the Facebook server infrastructure. This handshake notifies the other subscriber that they want to talk to him. With the help of the Facebook infrastructure, we can make so that calls can be initiated even before the plug-in is installed on the subscriber’s computer. We believe that this will give greater “virality” to the spread of this function and remove barriers to communication.

The user interface that you see in the video call itself is implemented by the Skype runtime. This is the video of the same quality that you can expect from a regular Skype video call, as this is a regular Skype video call. It is simply carried out from Facebook, and uses a “thin” user interface.

One of the challenges for Skype in providing this feature was scaling. Although Skype uses P2P technology to help scale up, we still rely on server infrastructure for some of the elements of our technical solution. To handle this load, Skype has significantly increased server capacity and added bandwidth in all of our data centers. Directly voice and video traffic uses the global P2P network of Skype, which allows you to achieve high quality without having to keep thousands of expensive servers. Together with Facebook, we will gradually deploy this new feature over the coming weeks and closely monitor the load and quality of communication as it unfolds. This means that some of you will see video call buttons on Facebook earlier, and others later. If you see such a button, please feel free to click on it - and you can call anyone on your Facebook friends list.

We think this is an amazing technology. We combined everything that makes Skype so cool - our quality of communication, our P2P technologies, our scale - with social network number one, and we did it in the most smooth way possible.

We hope you enjoy it too!

Source: https://habr.com/ru/post/123618/


All Articles