Skip to main content

Build a compact call

A private call between two people, or a handful: camera, microphone, screen share, leave and end. It is the quickest way to put calling in your product, and every other product guide here starts from it.

A video call with microphone, keypad and hang-up controls
1 request
from your server creates the room
9 SDKs
have a complete, runnable compact-call tutorial
0 installs
to join through the room link in a browser

How it fits together​

  1. CallerTaps CallIn your web, mobile or desktop app.
  2. Your serverCreates the roomAfter signing the person in. Your API key stays here.
  3. MediaSFUCarries the callAudio, video and screen share between everyone in the room.
  4. Both peopleTalk, then leaveLeave drops one person. End closes the call for all.

What MediaSFU handles​

You needMediaSFU gives youRead
A join screen, video tiles and call controlsThe supplied room UI in every SDK, or your own UI on the same engineChoose a UI level
Camera, microphone and screen shareDevice controls and remote media renderingDevices by SDK
Leave for one person, end for everyoneSeparate Leave and End actions, with End for the host onlyLeave, end and rejoin
Calls that survive a network dropReconnect and media recoveryRecovery by SDK
Phone callers in the same callSIP dial-in on the roomRooms API

Set it up​

  1. Create the room from your server. A two-person call needs a capacity of 2:

    curl -X POST https://mediasfu.com/v1/rooms \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
    -d '{"action":"create","userName":"host","duration":30,"capacity":2,"eventType":"conference"}'

    The response carries roomName, meetingID and publicURL.

  2. Send only those room details to your app. The API key never leaves your server; Secure backend has a complete Node route for this.

  3. Join from your app with your SDK (below), or open publicURL in a browser tab or iframe when you don't need an SDK at all.

Build it in your SDK​

Check it works​

  • Join from two browser profiles or devices. Both people appear in the participant list.
  • Turn on camera and microphone on one side and confirm the other side sees and hears it. Share a screen, then stop it.
  • Leave from one side: the other person stays. End as the host: both see the call finish.

Go further​