Peer-to-Peer Video Conferencing Using Ruby on Rails

2020 changed the digital world. Almost every person had to turn to video conferencing services. And I bet that you can’t already imagine life without video communication.

Could you know that it’s been a century since the first two-way video call in 1927? 

Nowadays, with the Internet, we can speak to somebody on the other side of the Earth. Besides, video call options are implemented into medical, fitness, consultancy. And almost any other online service platform you can imagine.

In fact, video calls have already evolved from just a means of communication to a new method of business interaction.  And those services that ignore video communication tend to stay aside from the modern market.

We are going to talk about how video conferencing software can be used in business. We’ll also discuss what are the ways to introduce video to your business activities. 

The Role of Video Calls in the Modern World 

Daily Interaction

We all enjoy communicating with friends and family. Peer-to-peer video calls give us an opportunity to interact freely like we are standing face-to-face. The video transmits in small data packages fast. So people see the emotions and actions in real-time. That’s amazing for maintaining long-distance relationships.

In addition, you can utilize video calls for business. Work remotely, delegate tasks, and hold meetings with your team or partners by video bridge.

Peer-to-Peer video conference: online transmittingPeer-to-Peer video conference: online transmitting

Online Transmitting

Sometimes you need to reach not just one or two people, but a whole audience.

Video-chatting programs allow you to call distant distributed audiences from all over the globe. This can be useful for webinars, corporate events, attracting customers, and generating leads. Online video calls are a great source of opportunities businesses should appreciate.

Peer-to-Peer video conference: online transmittingPeer-to-Peer video conference: online transmitting

Real-Time Surveillance

Peer video surveillance can be used in both commercial and state organizations. It can enhance the technologies we used for surveillance before. As it’s needed for security purposes. This new way to approach the problem can save someone’s life. 

Deep online integration enables building video-call streams into software systems. As well as running real-time observations, processing the images, and detecting dangers.

Peer-to-Peer video conference: real-time survellancePeer-to-Peer video conference: real-time survellance

Online Teaching

With video conferences, people can learn everything. From the languages to university programs remotely. Nowadays there is no need to be physically present. Use online interactive whiteboards and collaboration tools. Share multimedia, so online learning can be even more effective.

Peer-to-Peer video conference: online teachingPeer-to-Peer video conference: online teaching

Consulting

Over recent years the consulting industry is rapidly moving online. Various kinds of consultations help to improve businesses, software development, finance, HR, marketing, and management. There were times when consulting firms didn’t want to move online.

There was an idea that human touch will be lost. Since it was difficult to consult people through text messages and emails. Video conferencing helped to solve this problem by making conversations live and face-to-face. Just like offline. Nowadays, we can see that video communication is rather an advantage of consulting platforms. Take, for example, Clarity.fm platform.

Read more on How to build a marketplace like Clarity.fm

Peer-to-Peer video conference: consultingPeer-to-Peer video conference: consulting

Telemedicine

Telemedicine is a distribution of healthcare-related services and medical information via telecommunication technologies. As a rule. telemedicine is used to improve access to healthcare services. And both doctors and patients can use it.

Video Conferencing in telemedicine makes it possible for patients to contact their doctors. Monitor their health, get advice, and new medical knowledge. The doctors can communicate with their patients face-to-face. Therefore, they get a better understanding of their health.

Peer-to-Peer video conference: telemedicinePeer-to-Peer video conference: telemedicine

Video Conferencing Software Examples

Skype

Back in 2003, Skype was the very first video conferencing tool. Skype is a part of the Microsoft ecosystem. Therefore, it’s embedded into the modern operating systems of the company. It allows users to create profiles and connect to each other. It allows searching for the right account and establishing a connection with them.

The software allows making peer-to-peer video calls. But also enables web-based video chat and the exchange of files and photos. Importantly, you can also arrange group calls and conferences. And maintain the connection with multiple users simultaneously. 

The user can share an image from a camera or screen and voice the actions. To use Skype, a person needs to have an account. The users can access functionality both via a desktop application or its web browser version.

Peer-to-Peer video conference: SkypePeer-to-Peer video conference: Skype

Zoom

Zoom was created 8 years later after Skype. This is a videophone and online chat software. Zoom is a peer-to-peer video conference platform. That allows users to minimize computational expenses while using an application. 

Zoom gained much popularity thanks to such features as group video conferences, browser extensions. And the ability to share screen, or record meetings. Zoom is compatible with Windows, macOS, iOS, and Android. 

The customers can use Zoom for free. But for up to 100 users and with a 40-minute time limit. For longer conversations, there are paid subscriptions for  $15–20 per month. This is not that much for Peer-to-Peer Video Call.

Note: Skype and Zoom are applications that work separately. They are not integrated into other software and websites. Want to integrate video chat for a website or even develop a video conferencing app? It is usually much more reasonable to use Twilio or WebTRC accordingly. 

Peer-to-Peer video conference: ZoomPeer-to-Peer video conference: Zoom

Twilio

Twilio is a cloud communications platform as a service. It allows software developers to connect Twilio to websites and applications using API. Therefore, it is possible to integrate the ability to receive phone calls and text messages.

Twilio supports the development of open-source software. The Twilio company contributes to the open-source community. In Sloboda Studio, we often use Twilio to enable peer-to-peer calling developing online marketplaces. Besides, we use this cloud service building NLP chatbots like CallMeBot.

Related: Best video conferencing software Twilio VS Zoom

Peer-to-Peer video conference: TwilioPeer-to-Peer video conference: Twilio

WebRTC

WebRTC is a collection of useful JavaScript APIs. That can be used just by calling a constructor.

You don’t need to install any libraries to start using it. You can use it straight from the browser. And save lots of time on setting the configuration environment. It isn’t connected to any web development framework. And developers can embed it in a project without much hassle.

Note: In this post, we are describing the WebRTC usage in Ruby on Rails. And above we said that it’s fueled by JavaScript. This is the tricky part. Because we know how to combine the advantages of Ruby and the legacy of WebRTC in one system.

Peer-to-Peer video conference: WebRTCPeer-to-Peer video conference: WebRTC

What’s good about WebRTC?

  • As we have already mentioned, it doesn’t need any installations before it can be used.
  • WebRTC APIs allow sharing not only video stream, but also text, media files, and audio. the users of your Rails website will be able to share files via WebRTC and also do texting. It’s very common for webinars, conferences, online meetings, etc. Here are some examples of how to implement WebRTC file and text sharing.
  • WebRTC supports almost all modern browsers. For example, some time ago Safari didn’t have support for WebRTC. Now, this flaw has been eliminated; four versions of Safari support this API collection. This means the technology has great support and a robust community. So by choosing it, you won’t have to risk dealing with an obsolete tool. The picture below describes which browser versions support the technology. Bear in mind, this is not a complete list.
Peer-to-Peer video conference: WebRTCPeer-to-Peer video conference: WebRTC

Source: Caniuse.com

How to Build a Ruby on Rails Video Chat App with WebRTC

WebRTC has both JavaScript libraries. It provides access to video and audio devices on the user’s side. And, of course, open-source codecs for metadata.

Web browsers with WebRTC support all have a getUserMedia function. This allows gaining access to remote devices. This function has three parameters. They include device type. And the function to accept control in case of both successful and unsuccessful operations.

Searching the Internet for advice on how to utilize it in a project is confusing. For example, the complex abbreviations that are commonly used to describe the issue.

However, the biggest problem for newcomers is the complexity of WebRTC integration. Especially with projects not developed in Node.js.

Let’s look at an example: two peers need to connect with each other. They should share information about themselves with other peers. This is a problem for WebRTC, as it doesn’t have any opinions on signaling.

How to overcome this issue? Build such signaling for your specific project from scratch. The key to the problem of how Rails integrates with WebRTC is ActionCable.

Essentially, these are the steps:

  • First of all, you should connect the first user to the server. It’s needed to establish local and remote video streams.
  • The data with session descriptions transmitted from the user’s computer should become visible to this user. As a result, for the other clients.
  • Another user should connect to the first one via the server. It is done by accepting the offer from the first user. For this, you need to apply ActionCable.
  • Both clients have local and remote descriptions and invitations accepted. They can start exchanging files, texts, and maintain an audio and video bridge.

For a more detailed explanation, here is an extensive tutorial with examples of such an approach with code samples in a repository.

As you may have noticed, there is a lot of programming to do.

Nevertheless, WebRTC use isn’t so widespread yet. And there are not enough substantial tools to simplify the development process. However, you can use this inconvenience as an advantage. What if companies and startups using the technology aren’t numerous? You can outperform them by offering brand-new features and stand out from competitors.

Our Expertise with Video Conferencing

TikkTalk

[embedded content]

TikkTalk is a B2G and B2C marketplace. It offers access to different interpreters over video and phone conferences. When we met our client, the project was at its idea-stage. Initially, there was a goal to develop an MVP. That was needed to represent the core features of the first users and investors.

Project  results:

Nowadays, TikkTalk offers online translation services and has more than 1700 Interpreters ready to help. The online translation marketplace connects users from 72 countries and supports 67 languages.

For the TikkTalk platform, we decided to implement two video providers: Twilio and VideoNor. It turned out to be a better choice for this platform. Such marketplaces can also use video services for checking the interpreter’s skills. It can be useful for rare languages. 

B2C Consulting Marketplace

Counseling marketplace is a sub-marketplace, integrated with the core marketplaces. It enables video and audio communication between consultants and job-seekers. Therefore, they can learn how to pass a job interview successfully.

Our client’s goal was to add new essential functionality. That was needed for creating online video career counseling between job consultants and job-seekers. 

Our Solutions:

After analyzing the product, Sloboda Studio offered a suitable solution to build a sub-marketplace and connect it via API with the core platform. As a result, we added the core feature to our client’s marketplace – online video counseling. Now, new job-seekers can go through their personality analysis and book a career consultation.

Peer-to-Peer video conference: B2C Consulting MarketplacePeer-to-Peer video conference: B2C Consulting Marketplace

Conclusion

Video calls are common for a modern world. And the area of video conferences software usage is pretty wide. The choice is up to you. Today you can use Skype and Zoom for life. For studying, business, or hanging out with friends online. You can add video conferencing features to your startup with Twilio or WebTRC.

In this post, we described how to make good use of WebRTC. And integrate a cool video-streaming service into your web app. We have significant expertise in the implementation of similar web solutions. And can support your business endeavors with sharp minds and skills.

In Sloboda Studio, we are working with Ruby on Rails. We develop numerous projects, Ruby on Rails peer-to-peer video included. Ruby on Rails is a great framework to create an extensive website with state-of-the-art features. And surely, integrate video conferencing.

Posted by Contributor