Blog

How to choose a video call API: what to compare before you build

· Andrij Tkachenko · 13 min read

A magnifying glass over a video call window with two people in it, between a globe with lines joining points across it and a padlock

Choose a video call API by what happens to the hard calls and by what it counts: whether a call connects through a strict firewall, how close its servers are to your users, who can see the media, and whether the bill grows with minutes, people or resolution. HD video, screen sharing and a call screen are on every feature list, so it is those answers that tell services apart.

This post goes through ten questions to ask of any video call API, video call SDK or video conferencing API, with why each one matters and how to check the answer yourself. It names no service. At the end it answers every question for WordPlus Cloud, with what it leaves to you.

A meeting you embed, or calls in your own app

Two different kinds of service are sold under these words.

A meeting service gives you a room on a page of its own, which people open from a link or which you put in a frame on your site. A call API gives you the parts: an SDK for each platform, often with a ready-made call screen, and the calls happen inside your own app, between your own users.

Meeting you embed Call API and SDK
The call runs On its page, in a frame In your own screens
Who may join Whoever has the link Whom your server allows
You write A link A token route and a screen

There is a third way, open source media servers on servers of your own, and it leaves you the most to run. How group video calls work shows what that takes. The ten questions below are for the first two.

1. Does every call connect?

A video call goes straight between the two devices when their networks allow it, and many do not. Home routers, mobile networks and office firewalls each hide the devices behind them in their own way, so a share of calls connects only through a relay, a TURN server, that both sides can reach. Our post on STUN and TURN servers explains why.

Where that relay listens matters as much. TURN uses port 3478 by default and 5349 over TLS, and its standard carries it over TCP as well, because some firewalls block UDP entirely. A hotel or office network that lets out only the ports of the web blocks all of those, so only a relay on port 443 gets through.

Ask:

  • Are relays included, and on which ports, 443 among them?
  • What happens when even a relay cannot reach: does the call fail, or move to a server that can?
  • When a phone moves from Wi-Fi to mobile data, does the call go on, or hang up?

When a call will not connect, our post on failed WebRTC connections shows how to find out why.

2. How close are the servers to your users?

Each relay and media server adds the trip to it and back. The ITU recommendation on delay in calls, G.114, notes that most applications are not much affected while the delay stays below 150 ms one way. Two people in the same city who talk through a server on another continent hear each other late, though they live a few streets apart.

Ask:

  • Where are the relays and media servers, and does each person reach the nearest one by themselves?
  • In a group call with people on two continents, does everyone go to one server, or does each join one near them?

How to connect users across regions goes through what each answer means for a call.

3. Do a call of two and a group call work alike?

A call between two people can go straight between the devices. A group call cannot, past a handful of people, as each device would have to send its camera to every other one. So group calls run on media servers that take each camera once and forward it to the rest, and many services sell them as a second product, with an SDK and a price of their own.

Ask:

  • When a third person joins a call of two, do the two have to hang up and start again?
  • How many people may be on video at once, and in one call?
  • Can some people only listen, and speak once a host lets them?

4. What does the bill count?

Most video call APIs count participant minutes, a minute of one person in a call. A class of 30 for an hour is 1,800 of them, so the size of your calls matters more than how many there are. How much video calls cost per minute works a whole month through.

Then look at what else is counted. Some prices rise with the resolution, some count the minutes through a relay apart, and recording, bandwidth and calls between two people can each be a line of their own.

Ask:

  • Is a minute in HD counted like a minute on audio?
  • Are calls between two people counted, and those that go through a relay?
  • What happens past the plan: is a call cut off, or billed for the extra?

5. Who can see and hear the call?

Every WebRTC call is encrypted on its way. The WebRTC security architecture requires it: all media is secured with SRTP, with keys agreed over DTLS. That keeps out anyone on the network between the two ends. The question is where the ends are. In a call straight between two devices, they are the devices. In a call through a media server, the server is one of the ends, and it can see every frame.

A group call stays private from its media servers only when each frame is encrypted before it leaves the device, with keys the servers never hold. SFrame is the IETF standard for that, and some services do the same their own way.

Ask:

  • Who holds the keys of a group call: the service, my server, or only the people in it?
  • Is a call that moves to a relay or a media server still encrypted end to end?
  • Does a recording need the service to see the media?

6. Who decides who may call and join?

A call should start only where your app says yes. With most APIs your server signs a token for each call or room, and what differs is how much the token says. One that only lets a user in leaves the roles to the settings of the service. One that says who speaks, who only listens and who hosts keeps those decisions in your own code.

Ask:

  • Can a token given to one person be used by another, or for another call?
  • Can my server mute someone, take them out or end a call with no page open?
  • Can a host do the same from the call screen, and only a host?

7. How does a call reach the person called?

A call that rings in a tab nobody looks at is a missed call. Ask where it rings: in every tab the person has open, on their phone, and on a phone whose app is closed. A closed app rings only through the system calls of the phone, CallKit on iOS and the Telecom framework on Android, and the SDK has to support them.

Ask:

  • Does a call ring on every device at once, and stop everywhere once it is answered on one?
  • Does it ring a locked phone, and land in the list of recent calls?
  • How long does it ring, and what does each side learn when nobody answers?

8. Is there a ready-made call screen, and can you change it?

A call screen is more work than it looks: the ring, the choice of camera and microphone, the grid that rearranges itself, who is speaking, the shared screen, and sound that a browser keeps silent until someone clicks. A ready-made one saves weeks. It also has to look like the rest of your app.

Ask:

  • Which platforms have one: the web, React, iOS, Android?
  • Can I change its colours and words, and swap one part of it for my own?
  • Is the rest of the SDK there for a screen of my own, down to each person in a group call?
  • Is there a server library in the language I write, or an HTTP API?

9. What happens on a weak network?

Calls go wrong in small ways long before they fail. Every browser has to handle VP8 and H.264, as RFC 7742 requires, and what a call does on a bad connection is up to the service: lower the picture, choose another codec, send sound packets twice, or give up the camera to keep the voice.

Ask:

  • On a weak connection, does the picture give way before the sound does?
  • Does my screen learn how good each connection is, so it can tell the person?
  • When a connection drops for a moment, how long does the call wait for it?

A phone on one bar of mobile data answers these better than any page of specs.

10. What does your server hear back, and what are the limits?

Your app needs to know what happened: who called whom, how long they talked and why a call ended. It needs that to show a list of recent calls, to offer a message when nobody answered, or to bill your own users by the minute. Webhooks bring it, and as a webhook may come twice, each one needs an id.

Then read the limits page: how long a call may ring and last, how many people may be in one, and how long a token lives. And picture the day you leave. A call leaves less behind than a chat does. What stays is your record of each call, and it belongs in your own database.

Try it for an afternoon

A price list and a feature table answer few of these. A small test answers most. Build the smallest call you can on each service you are weighing, and run these seven steps:

  1. Call between two browsers on different networks, one on Wi-Fi and the other on a phone using mobile data.
  2. Call from a network that lets out only the web, such as a strict office or hotel Wi-Fi. Our WebRTC test shows beforehand what that network lets through.
  3. During a call, move one phone from Wi-Fi to mobile data. See whether the call goes on.
  4. Add a third person to a call of two. See whether the two have to hang up first.
  5. Open the app as the person called in two tabs and on a phone with the app closed, and call them. See where it rings, and whether the rest stop once one answers.
  6. From the browser console, try to join with a token your server gave someone else, or for another call.
  7. Open the usage page of the service, and read what this afternoon was counted as.

How WordPlus Cloud answers them

WordPlus Cloud is of the second kind: a call API, with SDKs and a ready-made call screen, on relays and media servers we run ourselves. The same ten questions, in order:

  1. Calls between two people connect on three paths, tried in turn: straight between the two devices, through our relays on 443 and 80, the ports of the web, and through our media servers when even the relays cannot reach. A call moves from one to another by itself, without hanging up.
  2. Our relays and media servers run in several regions, and each device reaches the nearest by itself. In a group call each person joins a server of their own region, and our servers pass each track between regions on private links. The network page shows them on a map.
  3. A call of two becomes a group call when either side adds someone, with nobody hanging up. Group calls run on our media servers, with no limit on people in a call, and your server says who speaks, who only listens and who hosts.
  4. The bill counts concurrent connections, starting from 1,000: $11.99 a month billed yearly, or $14.99 billed monthly. Calls between two people are included on every path, relayed or not. With 1,000 connections, group calls are unmetered up to 32 people on video at once, a person on audio counting half, and each further 1,000 connections add 12. Above that they cost $0.20 per 1,000 minutes of a person on video, $0.10 on audio, and your plan adds 5,000 credits a month for each 1,000 connections. One price at every resolution, and bandwidth and relays are never charged.
  5. Calls between two people are encrypted end to end on every path, through our relays and media servers too. A group call is encrypted end to end when your server says so: each frame is encrypted before it leaves the device, with a key only your server gives out, and our media servers forward what they cannot read.
  6. Your server decides. It gives the page a token for each call it allows, and for each person who joins a group call, saying who speaks, who only listens and who hosts. Hosts mute a microphone, let someone speak and remove someone, and your server can do the same with no page open and take access back at any moment.
  7. A call rings in every tab and app the person called has open, for 45 seconds, and stops ringing everywhere once they answer on one. The SDKs for iOS and Android ring a locked phone and a closed app as a phone call, through CallKit and Android call notifications. Each call says why it ended, nobody answering included.
  8. A ready-made call screen on the web, iOS and Android: call buttons, the ring and the call window, in nine languages. Change its colours and words, swap a piece of it for your own, or draw your own interface on the same SDK. Server libraries for Node.js, PHP and Python, guides for Next.js, Express, Laravel, plain PHP, Django, FastAPI and Flask, and an HTTP API for any other language.
  9. In a call between two people, the connection of the other side is reported as excellent, good, poor or lost, with the path the call took, so your screen can say so. A call changes its path by itself when a network changes, and the connection of one side may drop for up to 45 seconds and come back.
  10. Your server hears every call by webhook: who called whom, when it was answered, how many seconds they talked and why it ended, and when each person joined and left a group call, counted on our servers. A call keeps its id however often its webhook is sent, so a repeat is kept once. The limits are published: a call rings 45 seconds, a call token lasts up to 6 hours, and a side whose connection drops has 45 seconds to come back.

The calls guide has the code of each part in every stack. How to implement video calls in Next.js builds a whole app step by step, and the live demo lets you open it in two browsers and call from one to the other.

What it leaves to you

  • A route that gives the tokens. Who may call whom is your own logic, so it is code you write, and so is the record your webhook keeps of each call.
  • Telling someone they missed a call. A call rings for 45 seconds wherever the person has a page or an app. After that your server hears that nobody answered, and the email or the message is yours to send.
  • Recording. The SDKs for apps record no calls today.
  • Phone numbers. Calls are between the users of your app, over the internet, with no phone numbers and no telephone network.

If you want a meeting that anyone joins from a link, with no app of yours around it, a meeting service you embed fits you better. So it does if your calls must reach phone numbers.

Start with the calls guide

WordPlus Cloud for Apps is priced by concurrent connections, starting from 1,000, billed monthly or yearly. Calls between two people are included, and the same plan and SDK bring group calls, live streaming and chat on the same connection. See the video call API and SDK with every task in every stack, what the cloud does for apps, or the apps pricing. Choosing for chat too? How to choose a chat API asks the same of messages. Streaming to an audience as well? How to choose a live streaming API asks the same of a stream. Questions about your integration? Write to us.