The short answer
- WebRTC is an open standard for real-time audio, video and data, built into all major browsers and available for mobile apps, and it underpins most live lesson software.
- Peer-to-peer connections suit one-to-one lessons, while a selective forwarding unit (SFU) media server suits group classes, recording and learners on mixed connections.
- On a poor connection, protect audio and the whiteboard and lower video quality first, because a lesson can carry on without video and cannot carry on without sound.
Live video for online lessons means two-way audio and video between teacher and learner, with a delay short enough for natural conversation, usually alongside a shared whiteboard. Almost all of it runs on WebRTC, an open standard for real-time audio, video and data that is built into every major browser and available as libraries for iPhone and Android apps. The big decisions are whether media travels directly between devices or through a server, how lessons cope with poor connections, and whether you build on WebRTC yourself or use a video API.
How WebRTC works
A WebRTC call has four moving parts.
- Signalling. Before two devices can connect, they exchange details of what media they can send and how to reach each other. WebRTC does not define how this happens, so you run your own signalling server, usually over WebSockets.
- STUN. Most devices sit behind a router that hides their address. A STUN server tells each device its public address so the two can try to connect directly.
- TURN. Some networks, such as strict school or office firewalls, block direct connections. A TURN server relays the media instead. It always works, but all the traffic passes through your server and you pay for the bandwidth.
- Media. Audio and video are compressed with codecs, such as Opus for audio and VP8, VP9 or H.264 for video, and WebRTC always encrypts them in transit.
A process called ICE ties these together by trying the possible routes between two devices and choosing one that works. A reliable lesson platform needs TURN servers that also accept connections over TLS on port 443, because some networks allow nothing else.
Peer to peer, SFU or MCU
In a peer-to-peer call, each device sends its media straight to the other. With a media server, each device sends its media to the server, which passes it on. There are two kinds of media server.
| Peer to peer | SFU (selective forwarding unit) | MCU (multipoint control unit) | |
|---|---|---|---|
| How it works | Devices send media directly to each other | Server forwards each stream to the others without decoding it | Server decodes every stream and mixes them into one |
| Best for | One-to-one lessons | Group classes, recording, mixed connections | Very low-powered devices and older systems |
| Main server cost | Low: signalling, plus TURN when needed | Bandwidth | Processing power |
| Upload per device | One stream for each other participant | One stream, or a few quality layers | One stream |
| Recording | Harder: on a device, or by adding a server | Straightforward on the server | Straightforward, as media is already mixed |
| Adapting to each viewer | Limited | Good, using simulcast | Good, at high processing cost |
Peer to peer is fine for one teacher and one learner, but the upload each device needs grows with every extra person. In a group of six, each device would upload five copies of its video. An SFU solves this, because each device uploads once and the server forwards. With simulcast, a device sends the same video at two or three qualities and the SFU picks one for each viewer, so a learner on a weak connection gets the low-quality copy without spoiling the call for everyone else.
Latency and bandwidth
Latency is the delay between someone speaking and the other person hearing them. The ITU’s G.114 recommendation treats one-way delay of up to 150 milliseconds as acceptable for most conversation, and as delay rises beyond that, people start to talk over each other. WebRTC is designed for this range. Broadcast-style streaming such as HLS adds a delay measured in seconds, which suits a lecture watched by thousands and makes a conversation with a seven-year-old impossible.
Bandwidth is arithmetic. At an example video bitrate of 1 megabit per second, a 45-minute lesson is 2,700 seconds, so each direction carries 2,700 megabits, or about 340 megabytes. If a one-to-one lesson has to be relayed through a TURN server, the server sends out both directions, about 675 megabytes per lesson. At 1,000 relayed lessons a week, that is about 675 gigabytes of outbound traffic. That is why it pays to connect directly whenever the network allows, and to estimate TURN usage before launch.
Recording and consent
Recording a lesson creates a file of personal data, often about a child, so it needs a purpose, a lawful basis under UK GDPR and a clear notice. Settle these before building the feature:
- Why you record: safeguarding, quality review or a replay for the learner. Each purpose shapes who may watch and how long you keep the file.
- Your lawful basis. If it is consent and the learner is under 13, the consent must come from a parent.
- How people are told: in the booking terms, in the privacy notice and with a visible indicator in the classroom whenever recording is on.
- Who can open recordings, with every access logged.
- When recordings are deleted, enforced automatically.
For products used by children, the ICO’s Children’s code adds expectations about defaults and transparency. See the Children’s code for edtech.
Staying reliable on poor connections
Lessons happen on home Wi-Fi, on tablets in kitchens and on mobile data. A lesson platform has to keep going when the connection does not.
- Protect audio first. When bandwidth drops, lower video resolution and frame rate, then pause video, before audio suffers.
- Reconnect automatically. When the network changes, from Wi-Fi to mobile data for example, restart the connection without the user doing anything, and show “Reconnecting” while it happens.
- Check before the lesson. A short test of camera, microphone and connection catches problems while there is still time to fix them.
- Show quality honestly. A small connection indicator tells the teacher why the learner’s video is blurred.
- Fall back to TURN over TLS when direct connections fail.
In CurioKids, the classroom opens 15 minutes before a lesson, so a family can sort out a camera or microphone before the teacher needs them.
Whiteboards and shared state
A shared whiteboard is the other half of a lesson. Strokes, text and images need to appear on both screens within a fraction of a second, survive a reconnection and look the same to someone who joins late. Video can drop a frame; the whiteboard cannot drop a stroke.
The usual approach is to send whiteboard changes as small messages, over a WebRTC data channel or a WebSocket, and to keep the authoritative state on a server so that anyone reconnecting gets the current board. When both people can draw at once, conflict-free replicated data types (CRDTs) let each device apply changes in any order and still end up with the same board. Open-source libraries such as Yjs and Automerge implement them. Save the board when the lesson ends, so it can be shared with parents or picked up next time. CurioKids runs its lessons on live video with a shared whiteboard, and the two have to stay in step.
Build on WebRTC or use a video API
There are three routes, and most teams should start with one of the first two.
A hosted video API
Several providers sell video calling as a service, usually priced per participant minute. You get SDKs, TURN servers, recording and servers around the world. You give up some control, and the cost per minute matters more as volume grows.
An open-source SFU
Projects such as LiveKit, mediasoup and Janus give you the media server to host yourself, and some are also offered as a hosted service. You control cost and where data is processed, but you run the servers and keep them updated.
Raw WebRTC, peer to peer
This is fine for a one-to-one prototype with your own signalling and TURN. It gets harder once you need recording, group lessons or detailed quality data. Whichever route you choose, keep the video layer behind your own interface in the code, so changing provider later means replacing one module. For the rest of the product, see building a tutoring platform.
Questions people ask
What is WebRTC?
WebRTC is an open standard for sending real-time audio, video and data between devices. It is built into all major browsers and is available as libraries for mobile apps. Most online lesson and video call products are built on it.
Do I need a media server for one-to-one lessons?
Not necessarily. A one-to-one lesson can run peer to peer, with a TURN server for networks that block direct connections. A media server becomes worthwhile when you add group lessons, server-side recording or need better control over quality.
How much bandwidth does a video lesson use?
It depends on the video bitrate. At an example rate of 1 megabit per second, a 45-minute lesson carries about 340 megabytes in each direction. Bitrates fall automatically on poor connections, and audio needs far less than video.
Can I record online lessons with children?
Yes, with a clear purpose, a lawful basis under UK GDPR and a visible notice when recording is on. If you rely on consent and the child is under 13, the consent must come from a parent. Limit who can watch recordings and delete them on a fixed schedule.