Browse SDKs · React Native
SDKsReact Native

Audio and video calling overview

OpenIM React Native SDK guide for audio and video calling.

Copy

OpenIM React Native SDK provides calling signaling APIs for starting and handling call invitations, querying room information, and synchronizing call state. It handles call business signaling only; it does not capture or play audio and video, connect to media rooms, or render call UI.

After starting or accepting a call, the SDK returns room credentials such as roomID, token, and liveURL. The application passes these credentials to a real-time audio and video media engine to join the call room, and handles device permissions, media tracks, weak-network strategy, and UI state itself.

Call flow

  1. Call signalingInvite() to start a one-to-one call, or signalingInviteInGroup() to start a group call.
  2. Invitees receive the call invitation through OnReceiveNewInvitation and choose whether to accept or reject it.
  3. After accepting, call signalingAccept() and use the returned room credentials to join the call room.
  4. During the call, update the call UI based on invitation status, participant status, media-stream status, and custom signals.
  5. The inviter can cancel an invitation that has not connected; call participants can hang up an established call.

Core data

DataDescription
RtcInviteCall invitation containing the inviter, invitees, group, room, media type, timeout, and session type.
RtcInviteResultsThe roomID, token, and liveURL returned after starting or accepting a call, or querying room credentials.
CallingRoomDataRoom ID, invitation information, and participant information returned when querying by group.
OnReceiveNewInvitationPayloadEvent parameter for a received call invitation, containing invitation, optional offlinePushInfo, and participant information.

customData and custom signals are both application-defined strings. Use JSON or another format required by the application protocol.

Call state

After calling the start, accept, reject, cancel, or hang-up API, update the UI for the current action from the corresponding result. Call state from other users or devices is received through events. Use roomID to distinguish calls; use both roomID and userID to distinguish participant state.

For invitation lifecycle, participant room-entry and room-exit, and media-stream listeners, see Handle call events. For custom-signal listeners, see Send a custom signal.

Browse 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 hang up a callCancel a call invitation, Hang up a call
Query a room or restore a pending invitationGet a group call room, Get room credentials, Restore a pending invitation
Handle events and custom signalsHandle call events, Send a custom signal