Browse SDKs · WASM
SDKsWASM

Audio and video calling overview

Understand WASM SDK call signaling, room information, and event boundaries.

Copy

The WASM SDK provides the signaling APIs needed to start, accept, reject, cancel, and end calls, query rooms, and synchronize call state. It coordinates participants, room information, and the call lifecycle. It does not capture camera video, play remote media streams, or render the calling interface.

Pass the returned roomID, token, and liveURL to your chosen real-time audio and video engine. Your application remains responsible for device permissions, media tracks, poor-network strategies, and interface state. The WASM SDK signaling APIs are not a complete WebRTC media SDK.

Call flow

  1. Call signalingInvite() to start a one-to-one call or signalingInviteInGroup() to start a group call.
  2. The invitee receives the invitation through OnReceiveNewInvitation and chooses to accept or reject it.
  3. The invitee calls signalingAccept(), and both sides use the returned room credentials to connect to the media engine.
  4. During the call, update local state from participant, media-stream, and custom-signaling events.
  5. The caller can cancel an invitation that has not been answered. Any participant can end an established call.

Core data

DataDescription
RtcInviteInviter, invitees, group, room, media type, timeout, and session type.
RtcInviteResultsroomID, token, liveURL, and busy-user list returned by OpenIMServer.
CallingRoomDataRoom, invitation, and participant information queried by group.

Use customData and custom signaling only for business negotiation information that may be exposed to call participants. Do not place long-lived credentials, administrator keys, or other sensitive data in them.

State updates and event ownership

For state-changing calls such as start, accept, reject, cancel, and hang up, handle the API Promise and call events separately. Promise completion means OpenIMServer has accepted or completed the current signaling request. Events represent incremental state observed by the inviter, invitees, other devices, or room participants. They are not the same completion signal.

For the complete invitation lifecycle, participant, hang-up, and media-stream listeners, see Call events. For custom signaling events, see Send a custom signal. Room queries, token refreshes, and pending-invitation recovery return call-time snapshots only through their Promises.

The overview does not register event handlers. Use roomID as the primary key for call state and combine it with the user ID for participant state. After a new login, call changes are synchronized through call events. Query room information only when you need a current room snapshot.

Find a page by task

TaskPage
Start a one-to-one or group callStart a one-to-one call, Start a group call
Accept or reject an invitationAccept a call, Reject a call
Cancel an invitation or end a callCancel a call invitation, End a call
Recover a room or pending invitationGet a group call room, Get a call room token, Restore a pending call invitation
Handle call events and business negotiationCall events, Send a custom signal